firstModelAncestor function
InterfaceType?
firstModelAncestor(
- DartType? type
Implementation
InterfaceType? firstModelAncestor(DartType? type) {
if (type is InterfaceType) {
if (type.superclass != null &&
const TypeChecker.fromRuntime(Model).isExactlyType(type.superclass!)) {
return type;
} else {
return type.superclass == null
? null
: firstModelAncestor(type.superclass);
}
} else {
return null;
}
}