refactor(mobile): riverpod codegen + riverpod lint ()

* build(mobile): add riverpod_lint

* refactor(mobile): riverpod_generator for providers

* test(mobile): fix integration test helper

* refactor: ApiService to riverpod codegen

* refactor(mobile): return curatedcontent instead of people dto

* refactor: person provider to asyncnotifier

* mobile: update service providers to use lambda

* mobile: update scaffoldbody default error icon

* remove logger mixin

---------

Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2023-11-19 16:04:44 +00:00 committed by GitHub
parent bfab86b70d
commit 983473261b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 732 additions and 175 deletions
mobile/lib

View file

@ -43,7 +43,12 @@ void main() async {
await initApp();
await migrateDatabaseIfNeeded(db);
HttpOverrides.global = HttpSSLCertOverride();
runApp(getMainWidget(db));
runApp(
ProviderScope(
overrides: [dbProvider.overrideWithValue(db)],
child: getMainWidget(),
),
);
}
Future<void> initApp() async {
@ -103,16 +108,13 @@ Future<Isar> loadDb() async {
return db;
}
Widget getMainWidget(Isar db) {
Widget getMainWidget() {
return EasyLocalization(
supportedLocales: locales,
path: translationsPath,
useFallbackTranslations: true,
fallbackLocale: locales.first,
child: ProviderScope(
overrides: [dbProvider.overrideWithValue(db)],
child: const ImmichApp(),
),
child: const ImmichApp(),
);
}