isSubtypeOf method
Checks if this type is a subtype of other.
Implementation
@override
bool isSubtypeOf(RuntimeType other, {Object? value}) {
final f1 = _function;
if (other is NativeFunction) {
final f2 = other._function;
if (name == 'num') {
final isSubtype = switch (other._name) {
'num' => true,
'int' => true,
'double' => true,
_ => false,
};
return isSubtype;
}
return f1 == f2;
}
return false;
}