canParse static method

bool canParse(
  1. Object? obj
)

Implementation

static bool canParse(Object? obj) {
  if (obj is! Map<String, dynamic>) {
    return false;
  }
  if ((obj['modules'] is! List ||
      (obj['modules'].any((item) => !Module.canParse(item))))) {
    return false;
  }
  if (obj['totalModules'] is! int?) {
    return false;
  }
  return true;
}