@@ -14,6 +14,8 @@ It is a form-field and can therefore be used in a form.
14
14
</LinkBadgeGroup >
15
15
16
16
<Callout type = " info" >
17
+ For multi selections, consider using a [ multi select] ( /docs/form/multi-select ) .
18
+
17
19
For touch devices, a [ select tile group] ( /docs/tile/select-tile-group ) or
18
20
[ select menu tile] ( /docs/tile/select-menu-tile ) is generally recommended over this.
19
21
</Callout >
@@ -75,16 +77,15 @@ FSelect<String>(
75
77
description: const Text('Select your country of residence'),
76
78
hint: 'Choose a country',
77
79
format: (value) => value.toUpperCase(),
78
- divider: FItemDivider.none,
79
80
onChange: (value) => print('Selected country: $value'),
80
81
onSaved: (value) => print('Saved country: $value'),
81
- style: FSelectStyle.inherit(...),
82
82
autovalidateMode: AutovalidateMode.onUserInteraction,
83
83
builder: (context, styles, child) => child!,
84
84
prefixBuilder: (context, styles, _) => Icon(FIcons.globe),
85
85
suffixBuilder: (context, styles, _) => Icon(FIcons.arrowDown),
86
86
popoverConstraints: const FAutoWidthPortalConstraints(maxHeight: 400),
87
87
clearable: true,
88
+ contentDivider: FItemDivider.none,
88
89
contentScrollHandles: true,
89
90
initialValue: 'ca',
90
91
children: [
@@ -148,13 +149,13 @@ FSelect<User>.search(
148
149
description: const Text('Search and select a user'),
149
150
builder: (context, styles, child) => child!,
150
151
format: (user) => '${user.firstName} ${user.lastName}',
151
- divider: FItemDivider.none,
152
152
hint: 'Search users...',
153
153
popoverConstraints: const FAutoWidthPortalConstraints(maxHeight: 400),
154
154
clearable: true,
155
155
autoHide: false,
156
156
onChange: (value) => print('Selected country: $value'),
157
157
initialValue: 'value',
158
+ contentDivider: FItemDivider.none,
158
159
contentScrollHandles: false,
159
160
contentPhysics: const BouncingScrollPhysics(),
160
161
emptyBuilder: (context, style, _) => Text('No results'),
@@ -191,13 +192,13 @@ FSelect<User>.searchFromMap(
191
192
description: const Text('Search and select a user'),
192
193
builder: (context, styles, child) => child!,
193
194
format: (user) => '${user.firstName} ${user.lastName}',
194
- divider: FItemDivider.none,
195
195
hint: 'Search users...',
196
196
popoverConstraints: const FAutoWidthPortalConstraints(maxHeight: 400),
197
197
clearable: true,
198
198
autoHide: false,
199
199
onChange: (value) => print('Selected country: $value'),
200
200
initialValue: 'value',
201
+ contentDivider: FItemDivider.none,
201
202
contentScrollHandles: false,
202
203
contentPhysics: const BouncingScrollPhysics(),
203
204
emptyBuilder: (context, style, _) => Text('No results'),
@@ -359,7 +360,7 @@ FSelect<User>.searchFromMap(
359
360
@override
360
361
Widget build(BuildContext context) => FSelect<String>(
361
362
hint: 'Select a level',
362
- divider : FItemDivider.full ,
363
+ contentDivider : FItemDivider.none ,
363
364
format: (s) => s,
364
365
children: [
365
366
FSelectSection.fromMap(
@@ -639,7 +640,7 @@ FSelect<User>.searchFromMap(
639
640
child: const Text('Submit'),
640
641
onPress: () {
641
642
if (_formKey.currentState!.validate()) {
642
- // Form is valid, do something with department.e
643
+ // Form is valid, do something with department.
643
644
}
644
645
},
645
646
),
0 commit comments