From 90ea41ba0788c1f8c3ce1cf61a6c00f9d4d13a81 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 13 Apr 2020 13:31:17 -0700 Subject: [PATCH] Loosen argument type in callback (#65) The type was technically changed when refactoring to function type syntax, restore the `dynamic` but make it explicit. This surfaces as a static problem in the null safety branch. Fix it on the master branch as well for consistency. --- lib/src/chain.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/chain.dart b/lib/src/chain.dart index 602b90c092b58..48ac2d9d60fad 100644 --- a/lib/src/chain.dart +++ b/lib/src/chain.dart @@ -73,7 +73,7 @@ class Chain implements StackTrace { /// /// If [callback] returns a value, it will be returned by [capture] as well. static T capture(T Function() callback, - {void Function(Object error, Chain) onError, + {void Function(dynamic error, Chain) onError, bool when = true, bool errorZone = true}) { if (!errorZone && onError != null) {