isSubtype<Subtype, Supertype> function
Returns true
if Subtype
is a subtype of Supertype
.
Note that Subtype
and Supertype
must be known statically (that is, at
compilation-time)
Implementation
// See <https://github.com/dart-lang/language/issues/1312#issuecomment-727284104>
bool isSubtype<Subtype, Supertype>() => <Subtype>[] is List<Supertype>;