Skip to content

Commit

Permalink
fix: preserve app language on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder committed Feb 21, 2023
1 parent 5f75eaa commit 3603cd0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flutter_common/lib/src/utils/localization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class AppLanguage extends ChangeNotifier {
final prefs = await SharedPreferences.getInstance();
final languageCode = prefs.getString('language_code');
_appLocale = languageCode != null ? Locale(languageCode) : null;
notifyListeners();
}

Future<void> changeLanguage(Locale? locale) async {
Expand Down

0 comments on commit 3603cd0

Please sign in to comment.