Form

Select Group

A group of items that allow users to make a selection from a set of options.

For touch devices, a select tile group or select menu tile is generally recommended over this.

CLI

To generate a specific style for customization:

dart run forui style create select-group

Usage

FSelectGroup(...)

1FSelectGroup<String>(
2 style: const .delta(itemPadding: .value(.symmetric(vertical: 2))),
3 enabled: true,
4 children: [
5 .checkbox(value: 'apple', label: const Text('Apple')),
6 .checkbox(value: 'banana', label: const Text('Banana')),
7 .checkbox(value: 'cherry', label: const Text('Cherry')),
8 ],
9)

FSelectGroupItemMixin.checkbox(...)

1FSelectGroupItemMixin.checkbox<String>(
2 style: null,
3 value: 'apple',
4 enabled: true,
5 label: const Text('Apple'),
6 description: const Text('A red fruit'),
7 error: null,
8)

FSelectGroupItemMixin.radio(...)

1FSelectGroupItemMixin.radio<String>(
2 style: null,
3 value: 'apple',
4 enabled: true,
5 label: const Text('Apple'),
6 description: const Text('A red fruit'),
7 error: null,
8)

Examples

Checkbox Form

Radio Form

On this page