Created
February 12, 2025 04:29
-
-
Save nsmmrs/20eb52c1ea3de2459a19f600ebd256b1 to your computer and use it in GitHub Desktop.
Dart null safety
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() { | |
final List<List<int>> grid = [ | |
[1,2,3], | |
[4,5,6], | |
]; | |
// I thought this would fail to compile | |
// since grid[2] could be null: | |
print(grid[2][3]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment