isSubtypeOf<U> method
Whether this is a subtype of other
.
A class B
is a subtype of A
if an instance of B
is assignable to A
. For example,
List
is a subtype of Iterable
, but not a subtype of String
.
Note that a given class T
is considered to be a subtype of itself.
Implementation
bool isSubtypeOf<U>(RuntimeType<U> other) => other.isSupertypeOf(this);