onceError method

void onceError({
  1. required ErrorHandler handler,
})
inherited

Implementation

void onceError({required handler}) {
  // ignore: cancel_subscriptions
  var subscription = onError(handler: handler);
  subscription.onData((data) {
    if (data.containsKey(HostEventType.error)) offError(handler: handler);
  });
}