Make tap's onError arguments have specific types (dart-lang/stream_transform#75)
Currently onError has type void Function(dynamic, dynamic).
This causes a problem with something like:
void myOnError(Object error, StackTrace stackTrace) {}
stream.transform(tap(null, onError: myOnError)).listen(null);
As that causes an error:
type '(Object, StackTrace) => void' is not a subtype of type '(dynamic, dynamic) => void'
Note that (dynamic, dynamic) => void is a subtype of (Object, StackTrace) => void, so any function that can be passed to the old version can also be passed to the new one.1 file changed
tree: 439f1f04e95a9f0fe8293dc9e64af42e1e4a352e
- pkgs/