Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: lib/src/stream_splitter.dart

Issue 1841223002: Fix most strong mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/stream_splitter.dart
diff --git a/lib/src/stream_splitter.dart b/lib/src/stream_splitter.dart
index ec648aad1c42fd58c265a97a99f6d4149f4fc110..46b8b354eb2347926bdd2b211d67ab88a0e1cf00 100644
--- a/lib/src/stream_splitter.dart
+++ b/lib/src/stream_splitter.dart
@@ -57,10 +57,11 @@ class StreamSplitter<T> {
///
/// [count] defaults to 2. This is the same as creating [count] branches and
/// then closing the [StreamSplitter].
- static List<Stream> splitFrom(Stream stream, [int count]) {
+ static List<Stream/*<T>*/> splitFrom/*<T>*/(Stream/*<T>*/ stream,
+ [int count]) {
if (count == null) count = 2;
- var splitter = new StreamSplitter(stream);
- var streams = new List.generate(count, (_) => splitter.split());
+ var splitter = new StreamSplitter/*<T>*/(stream);
+ var streams = new List<Stream>.generate(count, (_) => splitter.split());
splitter.close();
return streams;
}
@@ -75,7 +76,7 @@ class StreamSplitter<T> {
throw new StateError("Can't call split() on a closed StreamSplitter.");
}
- var controller;
+ StreamController<T> controller;
controller = new StreamController<T>(
onListen: _onListen,
onPause: _onPause,

Powered by Google App Engine
This is Rietveld 408576698