Skip to content

Instantly share code, notes, and snippets.

@psygo
Last active May 6, 2020 02:18
Show Gist options
  • Save psygo/aa6fffc4b467e08eb06746ccc0cf8850 to your computer and use it in GitHub Desktop.
Save psygo/aa6fffc4b467e08eb06746ccc0cf8850 to your computer and use it in GitHub Desktop.
Dart Inheritance Check With `is`
main() {
print(ClassWithInheritance is BaseClass); // gives `false`
print(InterfaceImplementer is InterfaceExample); // gives `false`
}
class BaseClass {}
class ClassWithInheritance extends BaseClass {}
abstract class InterfaceExample {}
class InterfaceImplementer implements InterfaceExample {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment