Last active
March 30, 2022 09:15
-
-
Save krishnakumarcn/c78b6727f62b7a8fdad6acc575a3c3b1 to your computer and use it in GitHub Desktop.
Yield
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
yieldTester().listen((String test) => print(test)); | |
} | |
Stream<String> yieldTester() async*{ | |
yield "RSC"; | |
yield* test(); | |
yield "was here"; | |
} | |
Stream<String> test()async*{ | |
yield "dMerchant"; | |
await Future.delayed(Duration(seconds: 1)); | |
yield "flutter"; | |
yield "team"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment