Commit 80e300b3 authored by Shivanthi Fernando's avatar Shivanthi Fernando

Mobile app signup UI

parent 69420ebb
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'signup_screen.dart';
class LoginScreen extends StatefulWidget { class LoginScreen extends StatefulWidget {
@override @override
_LoginScreenState createState() => _LoginScreenState(); _LoginScreenState createState() => _LoginScreenState();
...@@ -139,7 +141,8 @@ Widget initWidget(BuildContext context) { ...@@ -139,7 +141,8 @@ Widget initWidget(BuildContext context) {
Text("Don't have an account?"), Text("Don't have an account?"),
GestureDetector( GestureDetector(
onTap: () => { onTap: () => {
//Link sign up screen Navigator.push(context,
MaterialPageRoute(builder: (context) => SignUpScreen()))
}, },
child: Text( child: Text(
"Register Now", "Register Now",
......
import 'package:flutter/material.dart';
import 'login_screen.dart';
class SignUpScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() => InitState();
}
class InitState extends State<SignUpScreen> {
@override
Widget build(BuildContext context) {
return initWidget();
}
Widget initWidget() {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
//Logo
Container(
margin: EdgeInsets.only(top: 100),
child: Image.asset("assets/logo.png"),
height: 100,
width: 100,
),
//Login Title
Container(
margin: EdgeInsets.only(top: 30, bottom: 0.5),
child: Center(
child: Text(
"SIGNUP",
style: TextStyle(
fontSize: 30,
color: Color(0xff01122b),
fontWeight: FontWeight.bold),
),
),
),
//Input fields
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 50),
padding: EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.grey[350],
boxShadow: [
BoxShadow(
offset: Offset(0, 10),
blurRadius: 50,
color: Color(0xffEEEEEE))
],
),
alignment: Alignment.center,
child: TextField(
cursorColor: Color(0xff01122b),
decoration: InputDecoration(
icon: Icon(
Icons.person,
color: Color(0xff01122b),
),
hintText: "Full Name",
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none),
),
),
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 20),
padding: EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.grey[350],
boxShadow: [
BoxShadow(
offset: Offset(0, 10),
blurRadius: 50,
color: Color(0xffEEEEEE))
],
),
alignment: Alignment.center,
child: TextField(
cursorColor: Color(0xff01122b),
decoration: InputDecoration(
icon: Icon(
Icons.email,
color: Color(0xff01122b),
),
hintText: "Enter Email",
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none),
),
),
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 20),
padding: EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.grey[350],
boxShadow: [
BoxShadow(
offset: Offset(0, 10),
blurRadius: 50,
color: Color(0xffEEEEEE))
],
),
alignment: Alignment.center,
child: TextField(
cursorColor: Color(0xff01122b),
decoration: InputDecoration(
icon: Icon(
Icons.phone,
color: Color(0xff01122b),
),
hintText: "Phone Number",
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none),
),
),
Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 20),
padding: EdgeInsets.only(left: 20, right: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.grey[350],
boxShadow: [
BoxShadow(
offset: Offset(0, 10),
blurRadius: 50,
color: Color(0xffEEEEEE))
],
),
alignment: Alignment.center,
child: TextField(
obscureText: true,
cursorColor: Color(0xff01122b),
decoration: InputDecoration(
icon: Icon(
Icons.vpn_key,
color: Color(0xff01122b),
),
hintText: "Enter Password",
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none),
),
),
GestureDetector(
onTap: () => {
Navigator.push(context,
MaterialPageRoute(builder: (context) => LoginScreen()))
},
child: Container(
margin: EdgeInsets.only(left: 20, right: 20, top: 70),
padding: EdgeInsets.only(left: 20, right: 20),
alignment: Alignment.center,
height: 54,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [(new Color(0xff01122b)), (new Color(0xff2b4366))],
begin: Alignment.centerLeft,
end: Alignment.centerRight),
borderRadius: BorderRadius.circular(50),
boxShadow: [
BoxShadow(
offset: Offset(0, 10),
blurRadius: 50,
color: Color(0xffEEEEEE))
],
),
child: Text(
"REGISTER",
style: TextStyle(color: Colors.white),
),
),
),
Container(
margin: EdgeInsets.only(top: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Already have an account?"),
GestureDetector(
onTap: () => {
Navigator.push(context,
MaterialPageRoute(builder: (context) => LoginScreen()))
},
child: Text(
" Login",
style: TextStyle(color: Color(0xff2b4366)),
),
)
],
),
)
],
)),
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment