NumberSelector class
A widget for selecting a numeric value using '<' and '>' buttons.
Constructors
- NumberSelector({required String label, required int value, required int min, required int max, Style style = Style.empty, Style buttonStyle = const Style(modifiers: Modifier.bold), void onChanged(int value)?})
- Creates a NumberSelector widget.
Properties
-
The text style applied to the '<' and '>' increment buttons.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
The optional key for this widget.
finalinherited
- label → String
-
The text label displayed before the selector.
final
- max → int
-
The maximum allowable value.
final
- min → int
-
The minimum allowable value.
final
- onChanged → void Function(int value)?
-
Callback fired when the value changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → Style
-
The text style applied to the label and value.
final
- value ↔ int
-
The currently selected numeric value.
getter/setter pair
Methods
-
createElement(
) → Element -
Creates an Element to manage this widget's location in the tree.
inherited
-
decrement(
) → void - Decreases the selected value by 1, down to min.
-
getIntrinsicHeight(
int width) → int -
Computes the intrinsic height of this widget under the given
widthconstraint.inherited -
handleMouseEvent(
MouseEvent event, int localX, int localY) → void - Interprets mouse interactions to increment or decrement the selector.
-
increment(
) → void - Increases the selected value by 1, up to max.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Buffer buffer, Rect area) → void -
Renders the widget onto the provided
bufferwithin the specifiedarea.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited