TranslationResponse.fromJson constructor

TranslationResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TranslationResponse.fromJson(Map<String, dynamic> json) {
  return TranslationResponse(
    TranslationResponseData.fromJson(json['responseData']),
    json['quotaFinished'],
    json['mtLangSupport'],
    json['responseDetails'],
    int.parse(json['responseStatus'].toString()),
    json['responderId'],
    json['exception_code'],
    ((json['matches'] == "" ? [] : json['matches']) as List)
        .map((e) => TranslationMatch.fromJson(e))
        .toList(),
  );
}