ScriptLanguage.fromJson constructor

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

Implementation

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