mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[sdk] Updating Stream.contains to accept null values.
Change-Id: Icdb4e3fb04625b8e0ffabe1214b196cd7a9eb1ed Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138888 Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Commit-Queue: Mark Zhou <markzipan@google.com>
This commit is contained in:
parent
7e0139e0c0
commit
44a4f366e2
|
@ -837,7 +837,7 @@ abstract class Stream<T> {
|
|||
* the returned future is completed with that error,
|
||||
* and processing stops.
|
||||
*/
|
||||
Future<bool> contains(Object needle) {
|
||||
Future<bool> contains(Object? needle) {
|
||||
_Future<bool> future = new _Future<bool>();
|
||||
StreamSubscription<T> subscription =
|
||||
this.listen(null, onError: future._completeError, onDone: () {
|
||||
|
|
Loading…
Reference in a new issue