Drop use of pkg:collection whereNotNull() (#278)
Exists in SDK as of v3.0
diff --git a/lib/src/cancelable_operation.dart b/lib/src/cancelable_operation.dart
index bb59f60..2610613 100644
--- a/lib/src/cancelable_operation.dart
+++ b/lib/src/cancelable_operation.dart
@@ -4,8 +4,6 @@
import 'dart:async';
-import 'package:collection/collection.dart';
-
/// An asynchronous operation that can be cancelled.
///
/// The value of this operation is exposed as [value]. When this operation is
@@ -521,7 +519,7 @@
final isFuture = toReturn is Future;
final cancelFutures = <Future<Object?>>[
if (isFuture) toReturn,
- ...?_cancelForwarders?.map(_forward).whereNotNull()
+ ...?_cancelForwarders?.map(_forward).nonNulls
];
final results = (isFuture && cancelFutures.length == 1)
? [await toReturn]
diff --git a/lib/src/stream_group.dart b/lib/src/stream_group.dart
index 78912c9..502a111 100644
--- a/lib/src/stream_group.dart
+++ b/lib/src/stream_group.dart
@@ -4,8 +4,6 @@
import 'dart:async';
-import 'package:collection/collection.dart';
-
/// A collection of streams whose events are unified and sent through a central
/// stream.
///
@@ -239,7 +237,7 @@
return null;
}
})
- .whereNotNull()
+ .nonNulls
.toList();
_subscriptions.clear();
diff --git a/lib/src/stream_queue.dart b/lib/src/stream_queue.dart
index f7ab8ba..c5c0c19 100644
--- a/lib/src/stream_queue.dart
+++ b/lib/src/stream_queue.dart
@@ -5,7 +5,7 @@
import 'dart:async';
import 'dart:collection';
-import 'package:collection/collection.dart';
+import 'package:collection/collection.dart' show QueueList;
import 'cancelable_operation.dart';
import 'result/result.dart';