onStateChange property
Triggers every time the button changes state.
The possible emitted values are:
FDBState.disabled
- the button is disabledFDBState.ready
- the button is ready to be pressedFDBState.running
- the button is pressed and theonPressed
future is runningFDBState.abort
- the button is pressed and theonPressed
future is runningFDBState.success
- theonPressed
future has completed with a valueFDBState.error
- theonPressed
future has completed with an error
Implementation
final void Function(FDBState)? onStateChange;