Select Tile Group
A group of tiles that allow users to make a selection from a set of options.
For desktop, a select group is generally recommended over this.
Preview
CLI
To generate and customize this style:
dart run forui style create select-tile-groupUsage
FSelectTileGroup(...)
FSelectTileGroup<Value>(
children: [
FSelectTile(title: const Text('Option 1'), value: Value.option1),
],
control: FMultiValueControl.managed(initial: {Value.option1}),
scrollController: ScrollController(),
style: FTileGroupStyle(...),
cacheExtent: 100,
maxHeight: 200,
dragStartBehavior: DragStartBehavior.start,
physics: const ClampingScrollPhysics(),
divider: FItemDivider.indented,
label: const Text('Sidebar'),
description: const Text('Select the items you want to display in the sidebar.'),
semanticsLabel: 'Sidebar',
errorBuilder: (context, error) => Text(error),
onSaved: (values) {},
onReset: () {},
validator: (values) => values?.isEmpty ?? true ? 'Select an item' : null,
forceErrorText: null,
enabled: true,
autovalidateMode: AutovalidateMode.disabled,
);FSelectTileGroup.builder(...)
FSelectTileGroup<int>.builder(
tileBuilder: (context, index) => FSelectTile(title: Text('Tile $index'), value: index),
count: 100,
control: FMultiValueControl.managed(initial: {1}),
scrollController: ScrollController(),
style: FTileGroupStyle(...),
cacheExtent: 100,
maxHeight: 200,
dragStartBehavior: DragStartBehavior.start,
physics: const ClampingScrollPhysics(),
divider: FItemDivider.indented,
label: const Text('Settings'),
description: const Text('Personalize your experience'),
semanticsLabel: 'Settings',
errorBuilder: (context, error) => Text(error),
onSaved: (values) {},
onReset: () {},
validator: (values) => values?.isEmpty ?? true ? 'Select an item' : null,
forceErrorText: null,
enabled: true,
autovalidateMode: AutovalidateMode.disabled,
);Examples
Behavior
Scrollable
Preview
Lazy Scrollable
Preview
Multi-value Form
Preview
Radio Form
Preview
Appearance
Custom Icons
Preview
Full Divider
Preview
No Divider
Preview
Last updated on