@@ -3,7 +3,11 @@ import 'package:app_flowy/startup/startup.dart';
33import 'package:app_flowy/workspace/presentation/home/home_stack.dart' ;
44import 'package:app_flowy/workspace/presentation/home/menu/menu.dart' ;
55import 'package:easy_localization/easy_localization.dart' ;
6+ import 'package:flowy_infra/color_extension.dart' ;
67import 'package:flowy_infra/image.dart' ;
8+ import 'package:flowy_infra/size.dart' ;
9+ import 'package:flowy_infra_ui/style_widget/extension.dart' ;
10+ import 'package:flowy_infra_ui/style_widget/hover.dart' ;
711import 'package:flowy_infra_ui/style_widget/text.dart' ;
812import 'package:flowy_infra_ui/widget/spacing.dart' ;
913import 'package:flutter/material.dart' ;
@@ -14,16 +18,27 @@ class MenuTrash extends StatelessWidget {
1418
1519 @override
1620 Widget build (BuildContext context) {
17- return SizedBox (
18- height: 26 ,
19- child: InkWell (
20- onTap: () {
21- getIt <MenuSharedState >().latestOpenView = null ;
22- getIt <HomeStackManager >()
23- .setPlugin (makePlugin (pluginType: PluginType .trash));
24- },
25- child: _render (context),
26- ),
21+ return ValueListenableBuilder (
22+ valueListenable: getIt <MenuSharedState >().notifier,
23+ builder: (context, value, child) {
24+ return FlowyHover (
25+ style: HoverStyle (
26+ hoverColor: AFThemeExtension .of (context).greySelect,
27+ ),
28+ isSelected: () => getIt <MenuSharedState >().latestOpenView == null ,
29+ child: SizedBox (
30+ height: 26 ,
31+ child: InkWell (
32+ onTap: () {
33+ getIt <MenuSharedState >().latestOpenView = null ;
34+ getIt <HomeStackManager >()
35+ .setPlugin (makePlugin (pluginType: PluginType .trash));
36+ },
37+ child: _render (context),
38+ ),
39+ ).padding (horizontal: Insets .l),
40+ ).padding (horizontal: 8 );
41+ },
2742 );
2843 }
2944
@@ -43,4 +58,4 @@ class MenuTrash extends StatelessWidget {
4358 ],
4459 );
4560 }
46- }
61+ }
0 commit comments