canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if (obj['format'] is! String) {
    return false;
  }
  if (obj['id'] is! int) {
    return false;
  }
  if (obj['sendTelemetry'] is! bool?) {
    return false;
  }
  if (obj['showUser'] is! bool?) {
    return false;
  }
  if (obj['url'] is! String?) {
    return false;
  }
  if (obj['urlLabel'] is! String?) {
    return false;
  }
  if (obj['variables'] is! Map<String, Object?>?) {
    return false;
  }
  return true;
}