fieldTypeOrNull static method
Assumes unknown
is a TFieldRecord or FieldModel and tries to get
the fieldType
property, or returns null
.
Implementation
static String? fieldTypeOrNull(dynamic unknown) {
try {
return unknown.fieldType as String;
} catch (_) {
try {
return unknown.$2 as String;
} catch (e) {
return null;
}
}
}