diff --git a/packages/riverpod/lib/src/async_notifier/base.dart b/packages/riverpod/lib/src/async_notifier/base.dart index b507c35b1..1f42af393 100644 --- a/packages/riverpod/lib/src/async_notifier/base.dart +++ b/packages/riverpod/lib/src/async_notifier/base.dart @@ -1,5 +1,3 @@ -// ignore_for_file: avoid_types_on_closure_parameters - part of '../async_notifier.dart'; /// A [AsyncNotifier] base class shared between family and non-family notifiers. @@ -295,6 +293,7 @@ mixin FutureHandlerProviderElementMixin data(value); done(); }, + // ignore: avoid_types_on_closure_parameters onError: (Object err, StackTrace stackTrace) { if (!running) return; error(err, stackTrace); @@ -384,7 +383,11 @@ mixin FutureHandlerProviderElementMixin final cancelSubscription = _cancelSubscription; if (cancelSubscription != null) { completer.future - .then((_) {}, onError: (Object _) {}) + .then( + (_) {}, + // ignore: avoid_types_on_closure_parameters + onError: (Object _) {}, + ) .whenComplete(cancelSubscription); } @@ -483,6 +486,7 @@ extension on Stream { Result? result; subscription = listen( (event) => result = Result.data(event), + // ignore: avoid_types_on_closure_parameters onError: (Object error, StackTrace stackTrace) { result = Result.error(error, stackTrace); },