ErrorListener typedef

void ErrorListener (
  1. dynamic error,
  2. StackTrace stackTrace

A callback that can be passed to StateNotifier.onError.

This callback should not throw.

It exists merely for error reporting (mainly FlutterError.onError), and should not be used otherwise.
If you need an error status, consider adding an error property on your custom StateNotifier.state.


typedef ErrorListener = void Function(dynamic error, StackTrace stackTrace);