WidgetPicker class

Inheritance

Constructors

WidgetPicker({Key? key, required List<String> options, required String value, required ValueChanged<String> onChanged, int itemCount = 3, double itemHeight = 50, double itemWidth = 100, Axis axis = Axis.vertical, TextStyle? textStyle, TextStyle? selectedTextStyle, bool haptics = false, Decoration? decoration, TextMapper? textMapper, bool infiniteLoop = false})

Properties

axis Axis
Direction of scrolling
final
decoration Decoration?
Decoration to apply to central box where the selected value is placed
final
haptics bool
Whether to trigger haptic pulses or not
final
hashCode int
The hash code for this object.
no setterinherited
infiniteLoop bool
final
itemCount int
Specifies how many items should be shown - defaults to 3
final
itemHeight double
height of single item in pixels
final
itemWidth double
width of single item in pixels
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<String>
Called when selected value changes
final
options List<String>
Available values a user can pick
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedTextStyle TextStyle?
Style of non-selected numbers. If null, it uses Theme's headline5 with accentColor
final
textMapper TextMapper?
Build the text of each item on the picker
final
textStyle TextStyle?
Style of non-selected numbers. If null, it uses Theme's bodyText2
final
value String
Currently selected value
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _WidgetPickerState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited