descriptionOrNull static method

String? descriptionOrNull(
  1. dynamic unknown
)

Assumes unknown is a TFieldRecord or FieldModel and tries to get the description property, or returns null.

Implementation

static String? descriptionOrNull(dynamic unknown) {
  try {
    return unknown.description as String;
  } catch (_) {
    try {
      return unknown.$8 as String;
    } catch (_) {
      return null;
    }
  }
}