Last active
January 23, 2020 16:31
-
-
Save AlexVegner/e1d02ff9c7c580c1d0abfba697a1c04b to your computer and use it in GitHub Desktop.
dart_type_test_operators.dart
This file contains hidden or 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() { | |
| dynamic value = 1; | |
| assert(value is int); // True if the object has the specified type | |
| assert(value is! double); // False if the object has the specified type | |
| int intValue = value as int; | |
| print(intValue); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment