load method

Future<bool> load()

Implementation

Future<bool> load() async {
  ByteData bytes = await rootBundle
      .load('${kLanguagePath}lang_${locale.languageCode}.json');
  String jsonString = utf8.decode(bytes.buffer.asUint8List());

  Map<String, dynamic> jsonMap = json.decode(jsonString);
  _localizedStrings =
      jsonMap.map((key, value) => MapEntry(key, value.toString()));
  return true;
}