|
|
@ -265,25 +265,30 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FlutterNativeSplash.remove(); |
|
|
|
FlutterNativeSplash.remove(); |
|
|
|
return ValueListenableBuilder( |
|
|
|
return ResultBuilder<Capabilities?>( |
|
|
|
valueListenable: themeNotifier, |
|
|
|
stream: activeAccountSnapshot.hasData |
|
|
|
builder: (final context, final nextcloudTheme, final child) => MaterialApp.router( |
|
|
|
? widget.accountsBloc.getCapabilitiesBloc(activeAccountSnapshot.data!).capabilities |
|
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates, |
|
|
|
: null, |
|
|
|
supportedLocales: AppLocalizations.supportedLocales, |
|
|
|
builder: (final context, final capabilitiesSnapshot) { |
|
|
|
themeMode: themeMode, |
|
|
|
final nextcloudTheme = capabilitiesSnapshot.data?.capabilities.theming; |
|
|
|
theme: getThemeFromNextcloudTheme( |
|
|
|
return MaterialApp.router( |
|
|
|
nextcloudTheme, |
|
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates, |
|
|
|
Brightness.light, |
|
|
|
supportedLocales: AppLocalizations.supportedLocales, |
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
themeMode: themeMode, |
|
|
|
), |
|
|
|
theme: getThemeFromNextcloudTheme( |
|
|
|
darkTheme: getThemeFromNextcloudTheme( |
|
|
|
nextcloudTheme, |
|
|
|
nextcloudTheme, |
|
|
|
Brightness.light, |
|
|
|
Brightness.dark, |
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
), |
|
|
|
oledAsDark: themeOLEDAsDark, |
|
|
|
darkTheme: getThemeFromNextcloudTheme( |
|
|
|
), |
|
|
|
nextcloudTheme, |
|
|
|
routerDelegate: _routerDelegate, |
|
|
|
Brightness.dark, |
|
|
|
), |
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
|
|
|
|
oledAsDark: themeOLEDAsDark, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
routerDelegate: _routerDelegate, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|