load method
Loads the localized strings.
Implementation
Future<bool> load() async {
try {
String data = await rootBundle.loadString(getPathFunction(locale));
Map<String, dynamic> strings = json.decode(data);
strings.forEach((String key, dynamic data) => _addValues(key, data));
return true;
} catch (exception, stacktrace) {
if (kDebugMode) {
print(exception);
print(stacktrace);
}
}
return false;
}