Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignUp/RndBtn #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/routes.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import 'screens/login.dart';
import 'screens/onboarding.dart';
import 'package:flutter/material.dart';
import 'screens/signup.dart';

final routes = {
'/': (BuildContext context) => Onboarding(),
'/loginPage': (BuildContext context) => LoginPage(),
'/signUpPage': (BuildContext context) => SignUpPage(),
};

Widget makeRoute(
Expand All @@ -28,5 +30,8 @@ Widget _buildRoute({
case '/loginPage':
return LoginPage();
break;
case '/signUpPage':
return SignUpPage();
break;
}
}
55 changes: 23 additions & 32 deletions lib/screens/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,47 +52,35 @@ class _LoginPageState extends State<LoginPage> {
),
Stack(
children: <Widget>[
Text('Email',
style: TextStyle(
color: Color.fromRGBO(87, 87, 87, 1),
fontWeight: FontWeight.normal,
fontSize: 12)),
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: TextFormField(
decoration: InputDecoration(
hintText: 'flutterinteractminna@gmail.com',
hintStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Color.fromRGBO(7, 29, 54, 1))),
keyboardType: TextInputType.emailAddress,
TextField(
keyboardType: TextInputType.emailAddress,
obscureText: false,
decoration: InputDecoration(
prefixIcon: Icon(
Icons.email,
),
border: OutlineInputBorder(),
labelText: 'email',
hintText: 'flutterinteractminna@gmail.com',
),
)
),
],
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.03,
),
Stack(
children: <Widget>[
Text('Password',
style: TextStyle(
color: Color.fromRGBO(87, 87, 87, 1),
fontWeight: FontWeight.normal,
fontSize: 12)),
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: TextFormField(
decoration: InputDecoration(
hintText: '*********',
hintStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.normal,
color: Color.fromRGBO(7, 29, 54, 1))),
obscureText: true,
TextField(
keyboardType: TextInputType.visiblePassword,
obscureText: true,
decoration: InputDecoration(
prefixIcon: Icon(Icons.lock),
border: OutlineInputBorder(),
labelText: 'password',
hintText: '******',
),
)
),
],
),
SizedBox(
Expand All @@ -102,6 +90,9 @@ class _LoginPageState extends State<LoginPage> {
height: 48,
width: double.infinity,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
color: Color.fromRGBO(44, 138, 248, 1),
elevation: 0.0,
onPressed: () {},
Expand Down
71 changes: 44 additions & 27 deletions lib/screens/onboarding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ class Onboarding extends StatelessWidget {
SizedBox(
height: MediaQuery.of(context).size.height * 0.01,
),
Text('What\'s New?',
style: TextStyle(
color: Color.fromRGBO(44, 138, 248, 1),
fontWeight: FontWeight.w500,
fontSize: 36)),
Text(
'What\'s New?',
style: TextStyle(
color: Color.fromRGBO(44, 138, 248, 1),
fontWeight: FontWeight.w500,
fontSize: 36),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.07,
),
Expand Down Expand Up @@ -84,12 +86,13 @@ class Onboarding extends StatelessWidget {
fontWeight: FontWeight.bold,
fontSize: 16)),
subtitle: Text(
'Run a codelab from your mobile phone and\nshare with the world.',
style: TextStyle(
color: Color.fromRGBO(118, 118, 118, 1),
fontWeight: FontWeight.normal,
height: 1.5,
fontSize: 12)),
'Run a codelab from your mobile phone and\nshare with the world.',
style: TextStyle(
color: Color.fromRGBO(118, 118, 118, 1),
fontWeight: FontWeight.normal,
height: 1.5,
fontSize: 12),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.1,
Expand All @@ -98,16 +101,21 @@ class Onboarding extends StatelessWidget {
height: 48,
width: MediaQuery.of(context).size.width,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
color: Color.fromRGBO(44, 138, 248, 1),
onPressed: () {
Navigator.of(context).pushNamed('/loginPage');
},
child: Text('Sign in ',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500,
height: 1.5,
fontSize: 16)),
child: Text(
'Sign in ',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w500,
height: 1.5,
fontSize: 16),
),
),
),
SizedBox(
Expand All @@ -117,19 +125,28 @@ class Onboarding extends StatelessWidget {
height: 48,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
border: Border.all(
color: Color.fromRGBO(44, 138, 248, 1), width: 1)),
border: Border.all(
color: Color.fromRGBO(44, 138, 248, 1),
width: 2,
),
),
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
color: Colors.white,
elevation: 0.0,
onPressed: () {},

child: Text('Sign Up',
style: TextStyle(
color: Color.fromRGBO(44, 138, 248, 1),
fontWeight: FontWeight.w500,
height: 1.5,
fontSize: 16)),
onPressed: () {
Navigator.of(context).pushNamed('/signUpPage');
},
child: Text(
'Sign Up',
style: TextStyle(
color: Color.fromRGBO(44, 138, 248, 1),
fontWeight: FontWeight.w500,
// height: 1.5,
fontSize: 16),
),
),
)
],
Expand Down
130 changes: 130 additions & 0 deletions lib/screens/signup.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import 'package:flutter/material.dart';

class SignUpPage extends StatefulWidget {
SignUpPage({Key key}) : super(key: key);

@override
_SignUpPageState createState() {
return _SignUpPageState();
}
}

class _SignUpPageState extends State<SignUpPage> {
@override
void initState() {
super.initState();
}

@override
void dispose() {
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.symmetric(horizontal: 36),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: MediaQuery.of(context).size.height * 0.25,
),
Text(
'Sign Up',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w500,
fontSize: 30.0,
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
),
Stack(
children: <Widget>[
TextField(
keyboardType: TextInputType.text,
obscureText: false,
decoration: InputDecoration(
labelText: 'Username',
hintText: 'johnDoe',
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.person),
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
),
Stack(
children: <Widget>[
TextField(
keyboardType: TextInputType.emailAddress,
obscureText: false,
decoration: InputDecoration(
prefixIcon: Icon(Icons.email),
border: OutlineInputBorder(),
labelText: 'E-Mail',
hintText: 'flutterinteractminna@gmail.com',
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
),
Stack(
children: <Widget>[
TextField(
keyboardType: TextInputType.visiblePassword,
obscureText: true,
decoration: InputDecoration(
prefixIcon: Icon(Icons.lock),
border: OutlineInputBorder(),
labelText: 'Password',
),
),
],
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.02,
),
Container(
height: 40,
width: double.infinity,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
color: Colors.blue,
elevation: 0.0,
onPressed: () {},
child: Text(
'Sign Up',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.035,
),
Container(
child: Center(
child: Text('have an account? Sign In'),
),
)
],
),
),
),
);
}
}
Loading