mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 12:25:11 +00:00
chore: Follow up fix systemuioverlaystyle
This commit is contained in:
parent
1085bddcd2
commit
dc0bd2f5b2
6 changed files with 25 additions and 39 deletions
|
@ -58,9 +58,11 @@ abstract class FluffyThemes {
|
|||
surfaceTintColor:
|
||||
brightness == Brightness.light ? Colors.white : Colors.black,
|
||||
shadowColor: Colors.black.withAlpha(64),
|
||||
systemOverlayStyle: brightness == Brightness.light
|
||||
? SystemUiOverlayStyle.dark
|
||||
: SystemUiOverlayStyle.light,
|
||||
systemOverlayStyle: SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: brightness.reversed,
|
||||
statusBarBrightness: brightness,
|
||||
),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -70,3 +72,8 @@ abstract class FluffyThemes {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
extension on Brightness {
|
||||
Brightness get reversed =>
|
||||
this == Brightness.dark ? Brightness.light : Brightness.dark;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,6 @@ class ConnectPageView extends StatelessWidget {
|
|||
return LoginScaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: !controller.loading,
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
Matrix.of(context).getLoginClient().homeserver?.host ?? '',
|
||||
|
|
|
@ -18,33 +18,21 @@ class HomeserverPickerView extends StatelessWidget {
|
|||
final benchmarkResults = controller.benchmarkResults;
|
||||
return LoginScaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: controller.restoreBackup,
|
||||
tooltip: L10n.of(context)!.hydrate,
|
||||
icon: const Icon(
|
||||
Icons.restore_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
icon: const Icon(Icons.restore_outlined),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: L10n.of(context)!.privacy,
|
||||
onPressed: () => launch(AppConfig.privacyUrl),
|
||||
icon: const Icon(
|
||||
Icons.shield_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
icon: const Icon(Icons.shield_outlined),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: L10n.of(context)!.about,
|
||||
onPressed: () => PlatformInfos.showDialog(context),
|
||||
icon: const Icon(
|
||||
Icons.info_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
icon: const Icon(Icons.info_outlined),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -16,9 +16,6 @@ class LoginView extends StatelessWidget {
|
|||
return LoginScaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: !controller.loading,
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
L10n.of(context)!.logInTo(Matrix.of(context)
|
||||
|
|
|
@ -14,9 +14,6 @@ class SignupPageView extends StatelessWidget {
|
|||
return LoginScaffold(
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: !controller.loading,
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
L10n.of(context)!.signUp,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
|
|
|
@ -13,19 +13,19 @@ class LoginScaffold extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
statusBarColor: Colors.transparent,
|
||||
systemNavigationBarContrastEnforced: false,
|
||||
systemNavigationBarColor: Colors.black,
|
||||
systemNavigationBarIconBrightness: Brightness.light,
|
||||
),
|
||||
);
|
||||
});
|
||||
return Scaffold(
|
||||
appBar: appBar,
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: appBar?.automaticallyImplyLeading ?? true,
|
||||
centerTitle: appBar?.centerTitle,
|
||||
title: appBar?.title,
|
||||
leading: appBar?.leading,
|
||||
actions: appBar?.actions,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
extendBody: true,
|
||||
body: Container(
|
||||
|
|
Loading…
Reference in a new issue