Fix translation code gen
This commit is contained in:
@@ -10,8 +10,13 @@ part 'locale_prefs.g.dart';
|
||||
|
||||
@Riverpod(keepAlive: true)
|
||||
class LocaleNotifier extends _$LocaleNotifier {
|
||||
late final _pref =
|
||||
Pref(ref.watch(sharedPreferencesProvider), "locale", AppLocale.en);
|
||||
late final _pref = Pref(
|
||||
ref.watch(sharedPreferencesProvider),
|
||||
"locale",
|
||||
AppLocale.en,
|
||||
mapFrom: AppLocale.values.byName,
|
||||
mapTo: (value) => value.name,
|
||||
);
|
||||
|
||||
@override
|
||||
AppLocale build() => _pref.getValue();
|
||||
|
||||
Reference in New Issue
Block a user