We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b35aca commit 62af370Copy full SHA for 62af370
pkgs/async/lib/src/subscription_stream.dart
@@ -76,10 +76,10 @@ class _CancelOnErrorSubscriptionWrapper<T>
76
super.onError((Object error, StackTrace stackTrace) {
77
// Wait for the cancel to complete before sending the error event.
78
super.cancel().whenComplete(() {
79
- if (handleError is ZoneBinaryCallback) {
80
- handleError(error, stackTrace);
81
- } else if (handleError != null) {
82
- (handleError as ZoneUnaryCallback)(error);
+ if (handleError is ZoneBinaryCallback<void, Object, StackTrace> || handleError is ZoneBinaryCallback) {
+ handleError?.call(error, stackTrace);
+ } else if (handleError is ZoneUnaryCallback<void, Object> || handleError is ZoneUnaryCallback) {
+ handleError?.call(error);
83
}
84
});
85
0 commit comments