| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| |
| import "dart:async"; |
| |
| extension Extension<T extends core::Object? = dynamic> on asy::Stream<T%> { |
| method call = self::Extension|call; |
| tearoff call = self::Extension|get#call; |
| } |
| static method main() → void { |
| asy::StreamController<core::String> controller = asy::StreamController::•<core::String>(); |
| let final asy::StreamController<core::String> #t1 = controller in self::Extension|call<core::String>(#t1.{asy::StreamController::stream}{asy::Stream<core::String>}, (dynamic s) → Null { |
| core::print(s); |
| }); |
| } |
| static method Extension|call<T extends core::Object? = dynamic>(lowered final asy::Stream<self::Extension|call::T%> #this, core::Function onData) → asy::StreamSubscription<self::Extension|call::T%> { |
| return #this.{asy::Stream::listen}((self::Extension|call::T% d) → void { |
| onData(d); |
| }){((self::Extension|call::T%) →? void, {cancelOnError: core::bool?, onDone: () →? void, onError: core::Function?}) → asy::StreamSubscription<self::Extension|call::T%>}; |
| } |
| static method Extension|get#call<T extends core::Object? = dynamic>(lowered final asy::Stream<self::Extension|get#call::T%> #this) → (core::Function) → asy::StreamSubscription<self::Extension|get#call::T%> |
| return (core::Function onData) → asy::StreamSubscription<self::Extension|get#call::T%> => self::Extension|call<self::Extension|get#call::T%>(#this, onData); |