canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if ((obj['appliesTo'] is! List ||
      (obj['appliesTo']
          .any((item) => item is! BreakpointModeApplicability)))) {
    return false;
  }
  if (obj['description'] is! String?) {
    return false;
  }
  if (obj['label'] is! String) {
    return false;
  }
  if (obj['mode'] is! String) {
    return false;
  }
  return true;
}