Skip to content

Instantly share code, notes, and snippets.

@AlexVegner
Last active January 23, 2020 16:31
Show Gist options
  • Select an option

  • Save AlexVegner/e1d02ff9c7c580c1d0abfba697a1c04b to your computer and use it in GitHub Desktop.

Select an option

Save AlexVegner/e1d02ff9c7c580c1d0abfba697a1c04b to your computer and use it in GitHub Desktop.
dart_type_test_operators​.dart
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