fix(mobile): fix nested MaterialApp ()

* fix nested MaterialApp

* chore

---------

Co-authored-by: dvbthien <dvbthien@gmail.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Thien Dang 2025-06-09 22:15:31 +07:00 committed by GitHub
parent 14d785cec9
commit 2572413b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 46 additions and 49 deletions
mobile/lib

View file

@ -205,27 +205,24 @@ class ImmichAppState extends ConsumerState<ImmichApp>
overrides: [
localeProvider.overrideWithValue(context.locale),
],
child: MaterialApp(
child: MaterialApp.router(
title: 'Immich',
debugShowCheckedModeBanner: true,
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
debugShowCheckedModeBanner: true,
home: MaterialApp.router(
title: 'Immich',
debugShowCheckedModeBanner: false,
themeMode: ref.watch(immichThemeModeProvider),
darkTheme: getThemeData(
colorScheme: immichTheme.dark,
locale: context.locale,
),
theme: getThemeData(
colorScheme: immichTheme.light,
locale: context.locale,
),
routeInformationParser: router.defaultRouteParser(),
routerDelegate: router.delegate(
navigatorObservers: () => [AppNavigationObserver(ref: ref)],
),
themeMode: ref.watch(immichThemeModeProvider),
darkTheme: getThemeData(
colorScheme: immichTheme.dark,
locale: context.locale,
),
theme: getThemeData(
colorScheme: immichTheme.light,
locale: context.locale,
),
routeInformationParser: router.defaultRouteParser(),
routerDelegate: router.delegate(
navigatorObservers: () => [AppNavigationObserver(ref: ref)],
),
),
);