onError method

void onError(
  1. ErrorCallback callback
)

Returns a callback when the component has an error.

Implementation

void onError(ErrorCallback callback) {
  _onErrorCallback = callback;
  notifyListeners();
}