load method

Future<void> load()

Load the translations from filename based on the locale.

Implementation

Future<void> load() async {
  print("$runtimeType - loading '$filename'");

  String jsonString = await rootBundle.loadString(filename, cache: false);

  translations = flatten(json.decode(jsonString) as Map<String, dynamic>);
}