Redesign login pages

This commit is contained in:
Christian Pauly 2020-01-27 10:59:03 +01:00
commit e4ed3cc7ef
11 changed files with 40 additions and 334 deletions

View file

@ -215,7 +215,7 @@ class _ChatDetailsState extends State<ChatDetails> {
child: Icon(Icons.edit),
)
: null,
title: Text("Group description:",
title: Text("${I18n.of(context).groupDescription}:",
style: TextStyle(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.bold)),

View file

@ -105,8 +105,7 @@ class _LoginState extends State<Login> {
),
body: ListView(
padding: EdgeInsets.symmetric(
vertical: 16,
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 16)),
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 0)),
children: <Widget>[
Container(
height: 150,
@ -114,15 +113,15 @@ class _LoginState extends State<Login> {
child: Center(
child: Icon(
Icons.vpn_key,
color: Theme.of(context).primaryColor,
size: 40,
size: 60,
),
),
),
ListTile(
leading: CircleAvatar(
backgroundColor: Colors.blue,
child: Icon(Icons.account_box),
backgroundColor: Colors.white,
child: Icon(Icons.account_box,
color: Theme.of(context).primaryColor),
),
title: TextField(
autocorrect: false,
@ -136,8 +135,8 @@ class _LoginState extends State<Login> {
),
ListTile(
leading: CircleAvatar(
backgroundColor: Colors.yellow,
child: Icon(Icons.lock),
backgroundColor: Colors.white,
child: Icon(Icons.lock, color: Theme.of(context).primaryColor),
),
title: TextField(
autocorrect: false,
@ -159,16 +158,17 @@ class _LoginState extends State<Login> {
SizedBox(height: 20),
Container(
height: 50,
padding: EdgeInsets.symmetric(horizontal: 12),
child: RaisedButton(
elevation: 7,
color: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),
borderRadius: BorderRadius.circular(6),
),
child: loading
? CircularProgressIndicator()
: Text(
I18n.of(context).login,
I18n.of(context).login.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => loading ? null : login(context),

View file

@ -107,18 +107,20 @@ class _SignUpState extends State<SignUp> {
),
body: ListView(
padding: EdgeInsets.symmetric(
vertical: 16,
horizontal:
max((MediaQuery.of(context).size.width - 600) / 2, 16)),
max((MediaQuery.of(context).size.width - 600) / 2, 0)),
children: <Widget>[
Image.asset("assets/fluffychat-banner.png"),
ListTile(
leading: CircleAvatar(
backgroundImage: avatar == null ? null : FileImage(avatar),
backgroundColor: avatar == null
? Colors.green
? Colors.white
: Theme.of(context).secondaryHeaderColor,
child: avatar == null ? Icon(Icons.camera_alt) : null,
child: avatar == null
? Icon(Icons.camera_alt,
color: Theme.of(context).primaryColor)
: null,
),
trailing: avatar == null
? null
@ -135,8 +137,11 @@ class _SignUpState extends State<SignUp> {
),
ListTile(
leading: CircleAvatar(
backgroundColor: Colors.blue,
child: Icon(Icons.account_box),
backgroundColor: Colors.white,
child: Icon(
Icons.account_circle,
color: Theme.of(context).primaryColor,
),
),
title: TextField(
autocorrect: false,
@ -151,16 +156,17 @@ class _SignUpState extends State<SignUp> {
SizedBox(height: 20),
Container(
height: 50,
padding: EdgeInsets.symmetric(horizontal: 12),
child: RaisedButton(
elevation: 7,
color: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),
borderRadius: BorderRadius.circular(6),
),
child: loading
? CircularProgressIndicator()
: Text(
I18n.of(context).signUp,
I18n.of(context).signUp.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => signUpAction(context),
@ -173,6 +179,7 @@ class _SignUpState extends State<SignUp> {
style: TextStyle(
decoration: TextDecoration.underline,
color: Colors.blue,
fontSize: 16,
),
),
onPressed: () => Navigator.of(context).push(

View file

@ -125,8 +125,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
),
body: ListView(
padding: EdgeInsets.symmetric(
vertical: 16,
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 16)),
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 0)),
children: <Widget>[
Container(
height: 150,
@ -141,8 +140,8 @@ class _SignUpPasswordState extends State<SignUpPassword> {
),
ListTile(
leading: CircleAvatar(
backgroundColor: Colors.yellow,
child: Icon(Icons.lock),
backgroundColor: Colors.white,
child: Icon(Icons.lock, color: Theme.of(context).primaryColor),
),
title: TextField(
controller: passwordController,
@ -165,16 +164,17 @@ class _SignUpPasswordState extends State<SignUpPassword> {
SizedBox(height: 20),
Container(
height: 50,
padding: EdgeInsets.symmetric(horizontal: 12),
child: RaisedButton(
elevation: 7,
color: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),
borderRadius: BorderRadius.circular(6),
),
child: loading
? CircularProgressIndicator()
: Text(
I18n.of(context).createAccountNow,
I18n.of(context).createAccountNow.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => loading ? null : _signUpAction(context),