Created with <3 with dartpad.dev.
Created
September 25, 2023 06:05
-
-
Save maks/7bc01aa4abd4faf1615f556ece014902 to your computer and use it in GitHub Desktop.
reverberating-oak-9145
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:math"; | |
// Example of use Dart's "late final" lazily initialised cached value | |
void main() { | |
late final int magicNumber = Random().nextInt(100); | |
print("1. magic number:$magicNumber"); | |
print("2. magic number:$magicNumber"); | |
print("3. magic number:$magicNumber"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment