Form
Radio
A radio button that typically allows the user to choose only one of a predefined set of options.
We recommend using a select group to create a group of radio buttons instead of using FRadio directly.
1class RadioExample extends StatefulWidget {2 @override3 State<RadioExample> createState() => _RadioExampleState();4}56class _RadioExampleState extends State<RadioExample> {7 bool _value = true;89 @override10 Widget build(BuildContext _) => FRadio(11 label: const Text('Default'),12 description: const Text('The description of the default option.'),13 value: _value,14 onChange: (value) => setState(() => _value = value),15 );16}17CLI
To generate and customize this style:
dart run forui style create radioUsage
FRadio(...)
1FRadio(2 style: const .delta(motion: .delta()),3 enabled: true,4 value: false,5 onChange: (value) {},6 label: const Text('Option'),7 description: const Text('Description'),8 error: null,9)Picker
A generic picker that allows an item to be selected. It is composed of one or more wheels, optionally with separators between those wheels. The picker supports arrow key navigation. Recommended for touch devices.
Select Group
A group of items that allow users to make a selection from a set of options.