InputSpinnerFeature class
Adds spinner controls (increment/decrement) to numeric input fields.
Provides up/down buttons to adjust numeric values in fixed steps. Optionally supports gesture-based adjustments (e.g., drag to change value).
Example:
TextField(
keyboardType: TextInputType.number,
features: [
InputSpinnerFeature(
step: 5.0,
enableGesture: true,
),
],
)
- Inheritance
-
- Object
- InputFeature
- InputSpinnerFeature
Constructors
- InputSpinnerFeature({InputFeatureVisibility visibility = InputFeatureVisibility.always, bool skipFocusTraversal = true, double step = 1.0, bool enableGesture = true, double? invalidValue = 0.0, double? min, double? max})
-
Creates an InputSpinnerFeature.
const
Properties
- enableGesture → bool
-
Whether to enable gesture-based value adjustment.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invalidValue → double?
-
Default value when the input is invalid or empty.
final
- max → double?
-
Maximum allowed value.
final
- min → double?
-
Minimum allowed value.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipFocusTraversal → bool
-
Whether to skip this feature in focus traversal.
finalinherited
- step → double
-
The amount to increment or decrement on each step.
final
- visibility → InputFeatureVisibility
-
Visibility mode for this input feature.
finalinherited
Methods
-
createState(
) → InputFeatureState< InputFeature> -
Creates the state for this input feature.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited