ErrorListener typedef Null safety

void ErrorListener(
  1. Object 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(Object error, StackTrace? stackTrace);