🅵
myList.map<int>((int value) => ++value);
Size: a a a
🅵
myList.map<int>((int value) => ++value);
🅵
T
🅵
🅵
T
T
🅵
🅵
import 'dart:async';
void main() {
final StreamController<List<int>> sc = StreamController<List<int>>.broadcast();
sc.stream.map<List<int>>((List<int> list) => list..insert(0, 99)).forEach((List<int> list) => print(list));
for (int i = 0; i < 5; i++) {
sc.sink.add(<int>[i]);
}
}
🅵
AK
🅵
🅵
🅵
import 'dart:async';
class Section {
final int id;
Section(this.id);
@override
String toString() => '<Section #${this.id.toString()}>';
}
void main() {
final StreamController<List<Section>> sc =
StreamController<List<Section>>.broadcast();
sc
..stream
.map<List<Section>>((List<Section> list) => list..insert(0, Section(99)))
.forEach((List<Section> list) => print(list));
for (int i = 0; i < 5; i++) {
sc.sink.add(<Section>[Section(i)]);
}
}
🅵
T
T
T
T