Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Dec 24, 2022
1 parent 662c977 commit 299d366
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 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.
Expand Down Expand Up @@ -295,6 +293,7 @@ mixin FutureHandlerProviderElementMixin<T>
data(value);
done();
},
// ignore: avoid_types_on_closure_parameters
onError: (Object err, StackTrace stackTrace) {
if (!running) return;
error(err, stackTrace);
Expand Down Expand Up @@ -384,7 +383,11 @@ mixin FutureHandlerProviderElementMixin<T>
final cancelSubscription = _cancelSubscription;
if (cancelSubscription != null) {
completer.future
.then((_) {}, onError: (Object _) {})
.then(
(_) {},
// ignore: avoid_types_on_closure_parameters
onError: (Object _) {},
)
.whenComplete(cancelSubscription);
}

Expand Down Expand Up @@ -483,6 +486,7 @@ extension<T> on Stream<T> {
Result<T>? result;
subscription = listen(
(event) => result = Result.data(event),
// ignore: avoid_types_on_closure_parameters
onError: (Object error, StackTrace stackTrace) {
result = Result.error(error, stackTrace);
},
Expand Down

0 comments on commit 299d366

Please sign in to comment.