Skip to content

Instantly share code, notes, and snippets.

@guid-empty
Created February 25, 2021 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guid-empty/897c99c184d683acc20bb5512169c55a to your computer and use it in GitHub Desktop.
Save guid-empty/897c99c184d683acc20bb5512169c55a to your computer and use it in GitHub Desktop.
Dart.Language.Variables & checking the type
void main() {
num value = 10;
bool isObject = value is Object;
print(value.runtimeType);
print(isObject);
Object obj = value as Object;
print(obj.runtimeType);
bool isNotString = value is! String;
print(isNotString);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment