setLanguage method
changes active language
Implementation
Future<void> setLanguage(
BuildContext context, {
required String language,
bool restart = true,
}) async {
_locale = Locale(language, "");
String filePath = "$_assetsDir$language.json";
String content = await rootBundle.loadString(filePath);
_values = json.decode(content);
if (restart) {
LocalizedApp.restart(context);
}
}