Created
May 13, 2020 14:13
-
-
Save s0nerik/498a0facccc28dfafba5878981105d38 to your computer and use it in GitHub Desktop.
Dart const List
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
main() { | |
final list1 = const <int>[]; | |
final list2 = const <int>[]; | |
print(identical(list1, list2)); | |
list1.add(666); | |
print(list1[0]); | |
print(list2[0]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment