Skip to content

Instantly share code, notes, and snippets.

@bradcypert
Created June 28, 2023 23:23
Show Gist options
  • Save bradcypert/bb13e2f585a49ade106fe764e4089af8 to your computer and use it in GitHub Desktop.
Save bradcypert/bb13e2f585a49ade106fe764e4089af8 to your computer and use it in GitHub Desktop.
class Monster {}
class Slime extends Monster {}
class Wolf extends Monster {}
final w = Wolf();
void main() {
print([Slime, Wolf].any((Type t) => w is t));
//print([Slime, Wolf].any((Type t) => w.runtimeType == t));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment