picker<T> abstract method
T
picker<T>(
- String name,
- Map<
String, T> options, - T defaultValue, {
- PickerStyle style = PickerStyle.dropdown,
A choice between named options, label to value.
Only the labels cross the wire — see KnobDescriptor.options — so the values behind them may be of any type at all, and the labels are whatever reads well rather than whatever an identifier happened to be called.
style is how the top bar draws it. A segmented control suits a switch
you flip back and forth while looking — Light and Dark — because both
options stay on the bar and a flip is one click rather than two.
Implementation
T picker<T>(
String name,
Map<String, T> options,
T defaultValue, {
PickerStyle style = PickerStyle.dropdown,
});