mirror of
https://github.com/immich-app/immich.git
synced 2025-07-15 20:38:26 +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:
parent
14d785cec9
commit
2572413b2b
3 changed files with 46 additions and 49 deletions
mobile/lib
|
@ -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)],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue