mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-04-30 22:57:23 +02:00
chore: Follow up fix systemuioverlaystyle
This commit is contained in:
parent
06ee00464a
commit
8e04f4cc73
@ -58,9 +58,11 @@ abstract class FluffyThemes {
|
|||||||
surfaceTintColor:
|
surfaceTintColor:
|
||||||
brightness == Brightness.light ? Colors.white : Colors.black,
|
brightness == Brightness.light ? Colors.white : Colors.black,
|
||||||
shadowColor: Colors.black.withAlpha(64),
|
shadowColor: Colors.black.withAlpha(64),
|
||||||
systemOverlayStyle: brightness == Brightness.light
|
systemOverlayStyle: SystemUiOverlayStyle(
|
||||||
? SystemUiOverlayStyle.dark
|
statusBarColor: Colors.transparent,
|
||||||
: SystemUiOverlayStyle.light,
|
statusBarIconBrightness: brightness.reversed,
|
||||||
|
statusBarBrightness: brightness,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||||
style: ElevatedButton.styleFrom(
|
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(
|
return LoginScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: !controller.loading,
|
automaticallyImplyLeading: !controller.loading,
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
|
||||||
elevation: 0,
|
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
Matrix.of(context).getLoginClient().homeserver?.host ?? '',
|
Matrix.of(context).getLoginClient().homeserver?.host ?? '',
|
||||||
|
@ -18,33 +18,21 @@ class HomeserverPickerView extends StatelessWidget {
|
|||||||
final benchmarkResults = controller.benchmarkResults;
|
final benchmarkResults = controller.benchmarkResults;
|
||||||
return LoginScaffold(
|
return LoginScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
elevation: 0,
|
|
||||||
scrolledUnderElevation: 0,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: controller.restoreBackup,
|
onPressed: controller.restoreBackup,
|
||||||
tooltip: L10n.of(context)!.hydrate,
|
tooltip: L10n.of(context)!.hydrate,
|
||||||
icon: const Icon(
|
icon: const Icon(Icons.restore_outlined),
|
||||||
Icons.restore_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: L10n.of(context)!.privacy,
|
tooltip: L10n.of(context)!.privacy,
|
||||||
onPressed: () => launch(AppConfig.privacyUrl),
|
onPressed: () => launch(AppConfig.privacyUrl),
|
||||||
icon: const Icon(
|
icon: const Icon(Icons.shield_outlined),
|
||||||
Icons.shield_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: L10n.of(context)!.about,
|
tooltip: L10n.of(context)!.about,
|
||||||
onPressed: () => PlatformInfos.showDialog(context),
|
onPressed: () => PlatformInfos.showDialog(context),
|
||||||
icon: const Icon(
|
icon: const Icon(Icons.info_outlined),
|
||||||
Icons.info_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -16,9 +16,6 @@ class LoginView extends StatelessWidget {
|
|||||||
return LoginScaffold(
|
return LoginScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: !controller.loading,
|
automaticallyImplyLeading: !controller.loading,
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
|
||||||
elevation: 0,
|
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context)!.logInTo(Matrix.of(context)
|
L10n.of(context)!.logInTo(Matrix.of(context)
|
||||||
|
@ -14,9 +14,6 @@ class SignupPageView extends StatelessWidget {
|
|||||||
return LoginScaffold(
|
return LoginScaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: !controller.loading,
|
automaticallyImplyLeading: !controller.loading,
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
iconTheme: const IconThemeData(color: Colors.white),
|
|
||||||
elevation: 0,
|
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context)!.signUp,
|
L10n.of(context)!.signUp,
|
||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
|
@ -13,19 +13,19 @@ class LoginScaffold extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
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,
|
extendBodyBehindAppBar: true,
|
||||||
extendBody: true,
|
extendBody: true,
|
||||||
body: Container(
|
body: Container(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user