load static method

Future<Translations> load(
  1. Locale locale
)

Implementation

static Future<Translations> load(Locale locale) async {
  String jsonContent = await rootBundle.loadString("assets/locale/i18n_${locale.languageCode}.json");
  return Translations(localizedValues: json.decode(jsonContent));
}