childrenOrNull static method
Assumes unknown
is a TFieldRecord or FieldModel and tries to get
the children
property, or returns null
.
Implementation
static List<Map<String, dynamic>>? childrenOrNull(dynamic unknown) {
try {
return (unknown.children as List<Map<String, dynamic>>);
} catch (_) {
try {
return unknown.$4 as List<Map<String, dynamic>>;
} catch (_) {
return null;
}
}
}