canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if ((obj['accessTypes'] is! List ||
      (obj['accessTypes']
          .any((item) => item is! DataBreakpointAccessType)))) {
    return false;
  }
  if (obj['canPersist'] is! bool?) {
    return false;
  }
  if ((obj['dataId'] is! String && obj['dataId'] != null)) {
    return false;
  }
  if (obj['description'] is! String) {
    return false;
  }
  return true;
}