# CountStepper
A stepper that increases or decreases the value.
# FLCountStepperController
FLCountStepperController ss the value controller of the stepper, you can set the maximum value, minimum value and the value of each step.
FLCountStepperController _controller = FLCountStepperController(
defaultValue: 0,
min: 0,
max: 10,
step: 1
);
Tips
Since Dart does not officially support decimal related operations, only int type is currently supported.
# FLCountStepper
FLCountStepper is responsible for configuring styles and interactions.
FLCountStepper(
controller: _controller,
disabled: false, // default is false
disableInput: true, // default is true
onChanged: (value) {}
)
The disable and disableInput properties control whether the button and the middle input box can be clicked.
# FLFloatingCountStepper
FLFloatingCountStepper is a special style Count Stepper.
FLFloatingCountStepper(
controller: _controller,
onChanged: (value) {},
)
# API
# FLCountStepperController
property | description | type | default value |
---|---|---|---|
defaultValue | default value | int | |
min | min value | int | 0 |
max | max value | int | 999 |
step | step value | int | 1 |
# FLCountStepper
property | description | type | default value |
---|---|---|---|
controller | stepper controller | FLCountStepperController | |
onChanged | changed callback | ValueChanged<num> | |
disabled | action button disabled | bool | false |
disableInput | input disabled | bool | true |
inputWidth | input width | double | 40 |
actionColor | action button color | Color |
# FLFloatingCountStepper
property | description | type | default value |
---|---|---|---|
controller | stepper controller | FLCountStepperController | |
onChanged | changed callback | ValueChanged<num> | |
disabled | action button disabled | bool | false |
labelWidth | number label width | double | 35 |
labelTextStyle | number text style | TextStyle | |
actionColor | action button color | Color |