primaryKeyOrNull static method
Assumes unknown
is a TFieldRecord or FieldModel and tries to get
the primaryKey
property, or returns null
.
Implementation
static bool? primaryKeyOrNull(dynamic unknown) {
try {
return unknown.primaryKey as bool?;
} catch (_) {
try {
return unknown.$5 as bool?;
} catch (_) {
return null;
}
}
}