OnCombined<T, R>.error constructor Null safety

OnCombined<T, R>.error(
  1. R fn(
    1. dynamic error,
    2. void refresh(

    The callback is invoked only when any of the Injected models emits a notification with error status and with no other model is waiting.


    factory OnCombined.error(
        R Function(dynamic error, void Function() refresh) fn) {
      return OnCombined._(
        onIdle: null,
        onWaiting: null,
        onError: (_, dynamic err, void Function() refresh) => fn(err, refresh),
        onData: null,