Created
May 12, 2020 06:06
-
-
Save theindianappguy/291ffef37c4d0d0b0336ea3cda5156d5 to your computer and use it in GitHub Desktop.
SignIn Screen UI for ChatApp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class SignIn extends StatefulWidget { | |
@override | |
_SignInState createState() => _SignInState(); | |
} | |
class _SignInState extends State<SignIn> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: appBarMain(context), | |
body: Container( | |
padding: EdgeInsets.symmetric(horizontal: 24), | |
child: Column( | |
children: [ | |
Spacer(), | |
Form( | |
child: Column( | |
children: [ | |
TextFormField( | |
style: simpleTextStyle(), | |
decoration: textFieldInputDecoration("email"), | |
), | |
TextFormField( | |
obscureText: true, | |
validator: (val) { | |
return val.length > 6 | |
? null | |
: "Enter Password 6+ characters"; | |
}, | |
style: simpleTextStyle(), | |
decoration: textFieldInputDecoration("password"), | |
), | |
], | |
), | |
), | |
SizedBox( | |
height: 16, | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.end, | |
children: [ | |
Container( | |
padding: EdgeInsets.symmetric( | |
horizontal: 16, vertical: 8), | |
child: Text( | |
"Forgot Password?", | |
style: simpleTextStyle(), | |
)), | |
], | |
), | |
SizedBox( | |
height: 16, | |
), | |
GestureDetector( | |
onTap: () { | |
//TODO | |
}, | |
child: Container( | |
padding: EdgeInsets.symmetric(vertical: 16), | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(30), | |
gradient: LinearGradient( | |
colors: [ | |
const Color(0xff007EF4), | |
const Color(0xff2A75BC) | |
], | |
)), | |
width: MediaQuery.of(context).size.width, | |
child: Text( | |
"Sign In", | |
style: biggerTextStyle(), | |
textAlign: TextAlign.center, | |
), | |
), | |
), | |
SizedBox( | |
height: 16, | |
), | |
Container( | |
padding: EdgeInsets.symmetric(vertical: 16), | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(30), | |
color: Colors.white), | |
width: MediaQuery.of(context).size.width, | |
child: Text( | |
"Sign In with Google", | |
style: | |
TextStyle(fontSize: 17, color: CustomTheme.textColor), | |
textAlign: TextAlign.center, | |
), | |
), | |
SizedBox( | |
height: 16, | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Text( | |
"Don't have account? ", | |
style: simpleTextStyle(), | |
), | |
Text( | |
"Register now", | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 16, | |
decoration: TextDecoration.underline), | |
), | |
], | |
), | |
SizedBox( | |
height: 50, | |
) | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment