diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d47eaf..eafa7b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.11.3 + +* Fix strong-mode warning against the signature of Future.then + ## 1.11.1 * Fix new strong-mode warnings introduced in Dart 1.17.0. diff --git a/lib/src/delegate/future.dart b/lib/src/delegate/future.dart index 8b81076..e30d41d 100644 --- a/lib/src/delegate/future.dart +++ b/lib/src/delegate/future.dart @@ -27,7 +27,7 @@ class DelegatingFuture implements Future { Future catchError(Function onError, {bool test(Object error)}) => _future.catchError(onError, test: test); - Future/**/ then/**/(/*=S*/ onValue(T value), {Function onError}) => + Future/**/ then/**/(dynamic onValue(T value), {Function onError}) => _future.then(onValue, onError: onError); Future whenComplete(action()) => _future.whenComplete(action); diff --git a/lib/src/typed/future.dart b/lib/src/typed/future.dart index f53ec5f..995f4b5 100644 --- a/lib/src/typed/future.dart +++ b/lib/src/typed/future.dart @@ -14,7 +14,7 @@ class TypeSafeFuture implements Future { Future catchError(Function onError, {bool test(Object error)}) async => new TypeSafeFuture(_future.catchError(onError, test: test)); - Future/**/ then/**/(/*=S*/ onValue(T value), {Function onError}) => + Future/**/ then/**/(dynamic onValue(T value), {Function onError}) => _future.then((value) => onValue(value as T), onError: onError); Future whenComplete(action()) => diff --git a/pubspec.yaml b/pubspec.yaml index 3981abb..2741747 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: async -version: 1.11.2 +version: 1.11.3 author: Dart Team description: Utility functions and classes related to the 'dart:async' library. homepage: https://www.github.com/dart-lang/async @@ -10,4 +10,4 @@ dev_dependencies: stack_trace: "^1.0.0" test: "^0.12.0" environment: - sdk: ">=1.12.0 <2.0.0" + sdk: ">=1.19.0 <2.0.0"