Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Drop use of pkg:collection whereNotNull()
Browse files Browse the repository at this point in the history
Exists in SDK as of v3.0
  • Loading branch information
kevmoo committed Jun 17, 2024
1 parent a004370 commit f63cbaf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions lib/src/cancelable_operation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -521,7 +519,7 @@ class CancelableCompleter<T> {
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]
Expand Down
4 changes: 1 addition & 3 deletions lib/src/stream_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -239,7 +237,7 @@ class StreamGroup<T> implements Sink<Stream<T>> {
return null;
}
})
.whereNotNull()
.nonNulls
.toList();

_subscriptions.clear();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/stream_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit f63cbaf

Please sign in to comment.