Last active
June 28, 2018 14:35
-
-
Save graphicbeacon/f481e853c09cee66ef55e62ddd4d97b3 to your computer and use it in GitHub Desktop.
Letter animation effect
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
import 'dart:async'; | |
void main() { | |
List<String> alphabets = 'abcdefghijklmnopqrstuvwxyz'.split(''); | |
var stream = new Stream.fromIterable(alphabets); | |
var count = 1; | |
stream.listen((char) { | |
Timer(Duration(seconds: 1 * count), () { | |
print(char); | |
}); | |
count++; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In response to https://dev.to/allanjeremy/explain-futures-and-streams-in-dart-like-im-five-46nd