1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-26 06:49:22 +00:00

Fix login route theme

This commit is contained in:
Pierre HUBERT 2020-05-04 19:28:09 +02:00
parent e3c9105b1c
commit 5c76f6e0a6

View File

@ -18,40 +18,57 @@ class LoginScaffold extends StatelessWidget {
final availableHeight = final availableHeight =
mediaQuery.size.height - mediaQuery.viewInsets.bottom; mediaQuery.size.height - mediaQuery.viewInsets.bottom;
final minHeight = 400.0; final minHeight = 450.0;
final contentHeight = final contentHeight =
availableHeight < minHeight ? minHeight : availableHeight; availableHeight < minHeight ? minHeight : availableHeight;
return Scaffold( return Theme(
body: SingleChildScrollView( data: Theme.of(context).copyWith(
child: Center( hintColor: Colors.white,
child: Container( inputDecorationTheme: InputDecorationTheme(
height: contentHeight, errorStyle: TextStyle(color: Colors.white),
child: ConstrainedBox( hintStyle: TextStyle(color: Colors.white),
constraints: BoxConstraints(maxWidth: 300), labelStyle: TextStyle(color: Colors.white),
child: Column( focusColor: Colors.white,
children: <Widget>[ fillColor: Colors.white,
Spacer(flex: 3), hoverColor: Colors.white,
Text("Comunic", style: TextStyle(fontSize: 50)), ),
Spacer(flex: 1), scaffoldBackgroundColor: Colors.indigo.shade900,
Text(tr("Free social network that respect your privacy")), textTheme: TextTheme(
Spacer(flex: 1), body1: TextStyle(color: Colors.white),
Padding( button: TextStyle(color: Colors.white),
padding: const EdgeInsets.all(8.0), ),
child: Material( ),
child: child, child: Scaffold(
color: Colors.indigo.shade500, body: SingleChildScrollView(
child: Center(
child: Container(
height: contentHeight,
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 300),
child: Column(
children: <Widget>[
Spacer(flex: 3),
Text("Comunic", style: TextStyle(fontSize: 50)),
Spacer(flex: 1),
Text(tr("Free social network that respect your privacy")),
Spacer(flex: 1),
Padding(
padding: const EdgeInsets.all(8.0),
child: Material(
child: child,
color: Colors.indigo.shade500,
),
), ),
), Spacer(flex: 5),
Spacer(flex: 5), ],
], ),
), ),
), ),
), ),
), ),
), ),
backgroundColor: Colors.indigo.shade900,
); );
} }
} }