Skip to content

Instantly share code, notes, and snippets.

@maks
Created September 25, 2023 06:05
Show Gist options
  • Save maks/7bc01aa4abd4faf1615f556ece014902 to your computer and use it in GitHub Desktop.
Save maks/7bc01aa4abd4faf1615f556ece014902 to your computer and use it in GitHub Desktop.
reverberating-oak-9145

reverberating-oak-9145

Created with <3 with dartpad.dev.

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