Created
January 22, 2020 15:50
-
-
Save AlexVegner/0f1b4abb976116dbe36b4ecdb0bec99b to your computer and use it in GitHub Desktop.
dart_default_value.dart
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() { | |
/// Uninitialized variables have an initial value of null. Even variables with numeric types are initially null, because numbers—like everything else in Dart—are objects. | |
int lineCount; | |
assert(lineCount == null); // woesn't work in dartpad | |
print(lineCount); | |
// Note: Production code ignores the assert() call. During development, on the other hand, assert(condition) throws an exception if condition is false. For details, see Assert. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment