1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-16 07:24:40 +02:00

fix(mobile): fix nested MaterialApp (#18998)

* 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
3 changed files with 46 additions and 49 deletions

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)],
),
),
);