AnalysisStatus.fromJson constructor

AnalysisStatus.fromJson(
  1. JsonDecoder jsonDecoder,
  2. String jsonPath,
  3. Object? json, {
  4. ClientUriConverter? clientUriConverter,
})

Implementation

factory AnalysisStatus.fromJson(
  JsonDecoder jsonDecoder,
  String jsonPath,
  Object? json, {
  ClientUriConverter? clientUriConverter,
}) {
  json ??= {};
  if (json is! Map) {
    throw jsonDecoder.mismatch(jsonPath, "'AnalysisStatus'", json);
  }
  bool isAnalyzing;
  if (json case {'isAnalyzing': var encodedIsAnalyzing}) {
    isAnalyzing = jsonDecoder.decodeBool(
      '$jsonPath.isAnalyzing',
      encodedIsAnalyzing,
    );
  } else {
    throw jsonDecoder.mismatch(jsonPath, "'isAnalyzing'", json);
  }
  return AnalysisStatus(isAnalyzing);
}