Skip to content

Commit

Permalink
Loosen argument type in callback (flutter#65)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
natebosch authored Apr 13, 2020
1 parent f78cfbb commit 90ea41b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/chain.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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>(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) {
Expand Down

0 comments on commit 90ea41b

Please sign in to comment.