SelectorFormItem<T> class

Form item that allows selection from a list.

Inheritance

Constructors

SelectorFormItem({String? key, required bool focused, String? label, required Map<T, String> items, required T startingValue, void valueChanged(WriggleContext context, T newValue)?, List<StateReference> dependencies = const []})
Form item that allows selection from a list.
const

Properties

dependencies List<StateReference>
When any dependency state changes, this state is invalidated.
finalinherited
focused bool
Focused.
final
hashCode int
The hash code for this object.
no setterinherited
items Map<T, String>
Items to allow choice from.
final
key String?
Key used to differentiate the states of different instances of this component.
finalinherited
label String?
Label for this field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startingValue → T
Starting value for this component's state.
finalinherited
stateReference StateReference
Reference to this component's state.
no setterinherited
valueChanged → void Function(WriggleContext context, T newValue)?
Selected value changed.
final

Methods

build(WriggleContext context) Renderable
Return a Renderable which is to be displayed.
override
discardState(WriggleContext context) → void
Return this state to its starting value.
inherited
getSize(WriggleContext context, Axis axis, int crossSize) int?
Report this item's intrinsic size, or null if it has none.
inherited
getState(WriggleContext context) → T
Read the current state of this component.
inherited
getUsageInfo(WriggleContext context) UsageInfo
Return usage info for this renderable, or redirect to its child.
inherited
keyPressed(WriggleContext context, KeyInput key) bool
Handle key presses. Return true if the key was absorbed, or false if another listener further up the tree should handle it.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(WriggleContext context, int width, int height) AxelMap
Produce an AxelMap of the specified size to be shown on screen.
inherited
setState(WriggleContext context, T update(T p1)) → void
Update this component's state.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

read<T>(WriggleContext context, String? key, T startingValue) → T
Read this component's internal state.
override