DictionaryLanguage.fromJson constructor

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

Implementation

factory DictionaryLanguage.fromJson(Map<String, dynamic> json) =>
    DictionaryLanguage(
      code: json['code'],
      name: utf8.decode(json['name'].codeUnits),
      nativeName: utf8.decode(json['nativeName'].codeUnits),
      scriptDirection: ScriptDirection.fromString(json['dir']),
      translations: (json['translations'] as List<dynamic>)
          .map((e) => Language.fromJson(e))
          .toList(),
    );