FluttyStateErrorCallback typedef

FluttyStateErrorCallback = void Function(String message, Object? exception)

Signature for callbacks invoked when a fetch or submit operation fails.

message is the human-readable error message that will be shown to the user. exception is the raw error caught by the cubit. It may be null if no exception was associated with the failure, and is typed as Object because Dart try/catch can catch any object (not only Exceptions).

Implementation

typedef FluttyStateErrorCallback = void Function(
  String message,
  Object? exception,
);