Fix translation code gen
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -120,8 +120,8 @@ jobs:
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
make gen
|
||||
make translate
|
||||
make gen
|
||||
|
||||
- name: Get Libs ${{ matrix.platform }}
|
||||
run: |
|
||||
|
||||
@@ -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