@@ -4,6 +4,8 @@ import 'package:fluent_ui/fluent_ui.dart';
4
4
5
5
import '../../../widgets/ax_pressure.dart' ;
6
6
import '../../../widgets/hover_opacity.dart' ;
7
+ import '../../../widgets/collection_item.dart' ;
8
+ import '../../../widgets/ax_reveal/ax_reveal.dart' ;
7
9
import '../../../widgets/context_menu_wrapper.dart' ;
8
10
import '../../../providers/responsive_providers.dart' ;
9
11
@@ -38,6 +40,8 @@ abstract class SearchCardState<T extends SearchCard> extends State<T> {
38
40
39
41
@override
40
42
Widget build (BuildContext context) {
43
+ final brightness = FluentTheme .of (context).brightness;
44
+
41
45
return ContextMenuWrapper (
42
46
contextAttachKey: contextAttachKey,
43
47
contextController: contextController,
@@ -110,38 +114,43 @@ abstract class SearchCardState<T extends SearchCard> extends State<T> {
110
114
);
111
115
}
112
116
113
- return Button (
114
- style: const ButtonStyle (
115
- padding: WidgetStatePropertyAll (EdgeInsets .all (0 )),
116
- ),
117
- onPressed: () => onPressed (context),
118
- child: ClipRRect (
119
- borderRadius: BorderRadius .circular (3 ),
120
- child: LayoutBuilder (
121
- builder: (context, constraints) {
122
- final size =
123
- min (constraints.maxWidth, constraints.maxHeight);
124
- return Row (
125
- children: [
126
- buildLeadingWidget (size),
127
- Expanded (
128
- child: Padding (
129
- padding: const EdgeInsets .all (8 ),
130
- child: Column (
131
- crossAxisAlignment: CrossAxisAlignment .start,
132
- mainAxisAlignment: MainAxisAlignment .center,
133
- children: [
134
- Text (
135
- getItemTitle (),
136
- overflow: TextOverflow .ellipsis,
137
- ),
138
- ],
117
+ return AxReveal (
118
+ config: brightness == Brightness .dark
119
+ ? defaultLightRevealConfig
120
+ : defaultDarkRevealConfig,
121
+ child: Button (
122
+ style: const ButtonStyle (
123
+ padding: WidgetStatePropertyAll (EdgeInsets .all (0 )),
124
+ ),
125
+ onPressed: () => onPressed (context),
126
+ child: ClipRRect (
127
+ borderRadius: BorderRadius .circular (3 ),
128
+ child: LayoutBuilder (
129
+ builder: (context, constraints) {
130
+ final size =
131
+ min (constraints.maxWidth, constraints.maxHeight);
132
+ return Row (
133
+ children: [
134
+ buildLeadingWidget (size),
135
+ Expanded (
136
+ child: Padding (
137
+ padding: const EdgeInsets .all (8 ),
138
+ child: Column (
139
+ crossAxisAlignment: CrossAxisAlignment .start,
140
+ mainAxisAlignment: MainAxisAlignment .center,
141
+ children: [
142
+ Text (
143
+ getItemTitle (),
144
+ overflow: TextOverflow .ellipsis,
145
+ ),
146
+ ],
147
+ ),
139
148
),
140
149
),
141
- ) ,
142
- ],
143
- );
144
- } ,
150
+ ] ,
151
+ );
152
+ },
153
+ ) ,
145
154
),
146
155
),
147
156
);
0 commit comments