onStateChange property

void Function(FDBState)? onStateChange
final

Triggers every time the button changes state.

The possible emitted values are:

  • FDBState.disabled - the button is disabled
  • FDBState.ready - the button is ready to be pressed
  • FDBState.running - the button is pressed and the onPressed future is running
  • FDBState.abort - the button is pressed and the onPressed future is running
  • FDBState.success - the onPressed future has completed with a value
  • FDBState.error - the onPressed future has completed with an error

Implementation

final void Function(FDBState)? onStateChange;