load method

Future<bool> load()

Implementation

Future<bool> load() async {
  String jsonString = await rootBundle.loadString(
      'packages/country_code_picker_x/i18n/${locale.languageCode}.json');
  Map<String, dynamic> jsonMap = json.decode(jsonString);

  _localizedStrings = jsonMap.map((key, value) {
    return MapEntry(key, value.toString());
  });

  return true;
}