@@ -18,7 +18,7 @@ A tile that, when triggered, displays a list of options for the user to pick fro
18
18
19
19
<Tabs items = { [' Preview' , ' Code' ]} >
20
20
<Tabs.Tab >
21
- <Widget name = ' select-menu-tile' variant = ' default' query = { {autoHide: ' false ' }} height = { 400 } />
21
+ <Widget name = ' select-menu-tile' variant = ' default' query = { {}} height = { 400 } />
22
22
</Tabs.Tab >
23
23
<Tabs.Tab >
24
24
``` dart copy
@@ -28,9 +28,8 @@ A tile that, when triggered, displays a list of options for the user to pick fro
28
28
@override
29
29
Widget build(BuildContext context) => FSelectMenuTile(
30
30
initialValue: Notification.all,
31
- autoHide: true,
32
31
validator: (value) => value == null ? 'Select an item' : null,
33
- prefixIcon : const Icon(FIcons.bell),
32
+ prefix : const Icon(FIcons.bell),
34
33
title: const Text('Notifications'),
35
34
detailsBuilder: (_, values, _) => Text(switch (values.firstOrNull) {
36
35
Notification.all => 'All',
@@ -81,12 +80,12 @@ FSelectMenuTile<Value>(
81
80
label: const Text('Sidebar'),
82
81
description: const Text('Select the items you want to display in the sidebar.'),
83
82
errorBuilder: (context, error) => Text(error),
84
- prefixIcon : Icon(FIcons.bell),
83
+ prefix : Icon(FIcons.bell),
85
84
title: Text('Notifications'),
86
85
subtitle: Text('subtitle'),
87
86
detailsBuilder: (context, values, child) => Placeholder()m
88
87
details: Text('All'),
89
- suffixIcon : Icon(FIcons.chevronsUpDown),
88
+ suffix : Icon(FIcons.chevronsUpDown),
90
89
onChange: (all) => print(all),
91
90
onSelect: (selection) => print(selection),
92
91
initialValue: Value.something,
@@ -121,12 +120,12 @@ FSelectMenuTile<Value>.builder(
121
120
label: const Text('Sidebar'),
122
121
description: const Text('Select the items you want to display in the sidebar.'),
123
122
errorBuilder: (context, error) => Text(error),
124
- prefixIcon : Icon(FIcons.bell),
123
+ prefix : Icon(FIcons.bell),
125
124
title: Text('Notifications'),
126
125
subtitle: Text('subtitle'),
127
126
detailsBuilder: (context, values, child) => Placeholder()m
128
127
details: Text('All'),
129
- suffixIcon : Icon(FIcons.chevronsUpDown),
128
+ suffix : Icon(FIcons.chevronsUpDown),
130
129
menuBuilder: (context, index) => index < 10 ? FSelectTile(
131
130
title: Text('Tile $index'),
132
131
value: Value.something,
@@ -140,11 +139,11 @@ FSelectMenuTile<Value>.builder(
140
139
141
140
## Examples
142
141
143
- ### Auto Hide
142
+ ### No Auto Hide
144
143
145
144
<Tabs items = { [' Preview' , ' Code' ]} >
146
145
<Tabs.Tab >
147
- <Widget name = ' select-menu-tile' variant = ' default' query = { {autoHide: ' true ' }} height = { 400 } />
146
+ <Widget name = ' select-menu-tile' variant = ' default' query = { {autoHide: ' false ' }} height = { 400 } />
148
147
</Tabs.Tab >
149
148
<Tabs.Tab >
150
149
``` dart {6} copy
@@ -154,9 +153,9 @@ FSelectMenuTile<Value>.builder(
154
153
@override
155
154
Widget build(BuildContext context) => FSelectMenuTile(
156
155
initialValue: Notification.all,
157
- autoHide: true ,
156
+ autoHide: false ,
158
157
validator: (value) => value == null ? 'Select an item' : null,
159
- prefixIcon : const Icon(FIcons.bell),
158
+ prefix : const Icon(FIcons.bell),
160
159
title: const Text('Notifications'),
161
160
detailsBuilder: (_, values, _) => Text(switch (values.firstOrNull) {
162
161
Notification.all => 'All',
@@ -191,7 +190,7 @@ FSelectMenuTile<Value>.builder(
191
190
initialValue: Notification.all,
192
191
maxHeight: 150,
193
192
validator: (value) => value == null ? 'Select an item' : null,
194
- prefixIcon : const Icon(FIcons.bell),
193
+ prefix : const Icon(FIcons.bell),
195
194
title: const Text('Notifications'),
196
195
detailsBuilder: (_, values, _) => Text(switch (values.firstOrNull) {
197
196
Notification.all => 'All',
@@ -235,10 +234,9 @@ FSelectMenuTile<Value>.builder(
235
234
@override
236
235
Widget build(BuildContext context) => FSelectMenuTile.builder(
237
236
selectController: controller,
238
- autoHide: true,
239
237
maxHeight: 200,
240
238
validator: (value) => value == null ? 'Select an item' : null,
241
- prefixIcon : Icon(FIcons.variable),
239
+ prefix : Icon(FIcons.variable),
242
240
title: const Text('Applicable values'),
243
241
menuBuilder: (context, index) => FSelectTile(
244
242
title: Text('Tile $index'),
@@ -283,9 +281,8 @@ FSelectMenuTile<Value>.builder(
283
281
children: [
284
282
FSelectMenuTile(
285
283
initialValue: Notification.all,
286
- autoHide: true,
287
284
validator: (value) => value == null ? 'Select an item' : null,
288
- prefixIcon : const Icon(FIcons.bell),
285
+ prefix : const Icon(FIcons.bell),
289
286
title: const Text('Notifications'),
290
287
detailsBuilder: (_, values, _) => Text(switch (values.firstOrNull) {
291
288
Notification.all => 'All',
0 commit comments