canParse static method

bool canParse(
  1. Object? obj
)
override

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if (obj['allThreadsStopped'] is! bool?) {
    return false;
  }
  if (obj['description'] is! String?) {
    return false;
  }
  if ((obj['hitBreakpointIds'] is! List ||
      (obj['hitBreakpointIds'].any((item) => item is! int)))) {
    return false;
  }
  if (obj['preserveFocusHint'] is! bool?) {
    return false;
  }
  if (obj['reason'] is! String) {
    return false;
  }
  if (obj['text'] is! String?) {
    return false;
  }
  if (obj['threadId'] is! int?) {
    return false;
  }
  return EventBody.canParse(obj);
}