widgetpicker 0.1.1 widgetpicker: ^0.1.1 copied to clipboard
WidgetPicker is a fork of NumberPicker to support categorical selection via the same UI.
WidgetPicker #
WidgetPicker is a fork of NumberPicker to support categorical selection via the same UI.
Example: #
(See example
for more)
class _WidgetExample extends StatefulWidget {
@override
__WidgetExampleState createState() => __WidgetExampleState();
}
class __WidgetExampleState extends State<_WidgetExample> {
String _currentValue = "Grape";
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
WidgetPicker(
value: _currentValue,
options: ["Apple", "Banana", "Grape", "Cherry", "Peach"],
onChanged: (value) => setState(() => _currentValue = value),
),
Text('Current value: $_currentValue'),
],
);
}
}