loadJsonLanguage method
Implementation
Future loadJsonLanguage() async {
String jsonString =
await rootBundle.loadString("assets/lang/${locale!.languageCode}.json");
// Parse the JSON string into a map
Map<String, dynamic> jsonMap = json.decode(jsonString);
// Convert the map values to strings and store them in the _localizedStrings map
_localizedStrings = jsonMap.map((key, value) {
return MapEntry(key, value.toString());
});
}