|
|
@ -28,14 +28,8 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra |
|
|
|
late final _routerDelegate = AppRouter( |
|
|
|
late final _routerDelegate = AppRouter( |
|
|
|
navigatorKey: _navigatorKey, |
|
|
|
navigatorKey: _navigatorKey, |
|
|
|
accountsBloc: _accountsBloc, |
|
|
|
accountsBloc: _accountsBloc, |
|
|
|
onThemeChanged: (final nextcloudTheme) { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
_nextcloudTheme = nextcloudTheme; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
NextcloudCoreServerCapabilities_Ocs_Data_Capabilities_Theming? _nextcloudTheme; |
|
|
|
|
|
|
|
Rect? _lastBounds; |
|
|
|
Rect? _lastBounds; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
@ -271,22 +265,25 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FlutterNativeSplash.remove(); |
|
|
|
FlutterNativeSplash.remove(); |
|
|
|
return MaterialApp.router( |
|
|
|
return ValueListenableBuilder( |
|
|
|
|
|
|
|
valueListenable: themeNotifier, |
|
|
|
|
|
|
|
builder: (final context, final nextcloudTheme, final child) => MaterialApp.router( |
|
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates, |
|
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates, |
|
|
|
supportedLocales: AppLocalizations.supportedLocales, |
|
|
|
supportedLocales: AppLocalizations.supportedLocales, |
|
|
|
themeMode: themeMode, |
|
|
|
themeMode: themeMode, |
|
|
|
theme: getThemeFromNextcloudTheme( |
|
|
|
theme: getThemeFromNextcloudTheme( |
|
|
|
_nextcloudTheme, |
|
|
|
nextcloudTheme, |
|
|
|
Brightness.light, |
|
|
|
Brightness.light, |
|
|
|
keepOriginalAccentColor: _nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
), |
|
|
|
), |
|
|
|
darkTheme: getThemeFromNextcloudTheme( |
|
|
|
darkTheme: getThemeFromNextcloudTheme( |
|
|
|
_nextcloudTheme, |
|
|
|
nextcloudTheme, |
|
|
|
Brightness.dark, |
|
|
|
Brightness.dark, |
|
|
|
|
|
|
|
keepOriginalAccentColor: nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
oledAsDark: themeOLEDAsDark, |
|
|
|
oledAsDark: themeOLEDAsDark, |
|
|
|
keepOriginalAccentColor: _nextcloudTheme == null || (themeKeepOriginalAccentColor ?? false), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
routerDelegate: _routerDelegate, |
|
|
|
routerDelegate: _routerDelegate, |
|
|
|
|
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|