Skip to content

update #47

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

Open
wants to merge 2 commits 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
42 changes: 30 additions & 12 deletions lib/login_screen_1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,17 @@ class LoginScreen1 extends StatelessWidget {
children: <Widget>[
Text(
"DEMO",
style: TextStyle(fontSize: 50.0, fontWeight: FontWeight.bold, color: this.primaryColor),
style: TextStyle(
fontSize: 50.0,
fontWeight: FontWeight.bold,
color: this.primaryColor),
),
Text(
"Login Screen 1",
style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, color: this.primaryColor),
style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
color: this.primaryColor),
),
],
),
Expand All @@ -68,11 +74,13 @@ class LoginScreen1 extends StatelessWidget {
),
borderRadius: BorderRadius.circular(20.0),
),
margin: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
margin: const EdgeInsets.symmetric(
vertical: 10.0, horizontal: 20.0),
child: Row(
children: <Widget>[
new Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 15.0),
child: Icon(
Icons.person_outline,
color: Colors.grey,
Expand Down Expand Up @@ -111,11 +119,13 @@ class LoginScreen1 extends StatelessWidget {
),
borderRadius: BorderRadius.circular(20.0),
),
margin: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0),
margin: const EdgeInsets.symmetric(
vertical: 10.0, horizontal: 20.0),
child: Row(
children: <Widget>[
new Padding(
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 15.0),
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 15.0),
child: Icon(
Icons.lock_open,
color: Colors.grey,
Expand Down Expand Up @@ -146,7 +156,8 @@ class LoginScreen1 extends StatelessWidget {
children: <Widget>[
new Expanded(
child: FlatButton(
shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(30.0)),
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0)),
splashColor: this.primaryColor,
color: this.primaryColor,
child: new Row(
Expand All @@ -166,7 +177,9 @@ class LoginScreen1 extends StatelessWidget {
child: new Container(
padding: const EdgeInsets.all(5.0),
child: FlatButton(
shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(28.0)),
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0)),
splashColor: Colors.white,
color: Colors.white,
child: Icon(
Expand All @@ -192,7 +205,8 @@ class LoginScreen1 extends StatelessWidget {
children: <Widget>[
new Expanded(
child: FlatButton(
shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(30.0)),
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0)),
splashColor: Color(0xFF3B5998),
color: Color(0xff3B5998),
child: new Row(
Expand All @@ -212,11 +226,14 @@ class LoginScreen1 extends StatelessWidget {
child: new Container(
padding: const EdgeInsets.all(5.0),
child: FlatButton(
shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(28.0)),
shape: new RoundedRectangleBorder(
borderRadius:
new BorderRadius.circular(28.0)),
splashColor: Colors.white,
color: Colors.white,
child: Icon(
const IconData(0xea90, fontFamily: 'icomoon'),
const IconData(0xea90,
fontFamily: 'icomoon'),
color: Color(0xff3b5998),
),
onPressed: () => {},
Expand All @@ -238,7 +255,8 @@ class LoginScreen1 extends StatelessWidget {
children: <Widget>[
new Expanded(
child: FlatButton(
shape: new RoundedRectangleBorder(borderRadius: new BorderRadius.circular(30.0)),
shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0)),
color: Colors.transparent,
child: Container(
padding: const EdgeInsets.only(left: 20.0),
Expand Down
54 changes: 38 additions & 16 deletions lib/login_screen_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ class LoginScreen2 extends StatelessWidget {
decoration: new BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: new Alignment(1.0, 0.0), // 10% of the width, so there are ten blinds.
colors: [this.backgroundColor1!, this.backgroundColor2!], // whitish to gray
tileMode: TileMode.repeated, // repeats the gradient over the canvas
end: new Alignment(
1.0, 0.0), // 10% of the width, so there are ten blinds.
colors: [
this.backgroundColor1!,
this.backgroundColor2!
], // whitish to gray
tileMode:
TileMode.repeated, // repeats the gradient over the canvas
),
),
height: MediaQuery.of(context).size.height,
Expand Down Expand Up @@ -78,7 +83,10 @@ class LoginScreen2 extends StatelessWidget {
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: this.foregroundColor!, width: 0.5, style: BorderStyle.solid),
bottom: BorderSide(
color: this.foregroundColor!,
width: 0.5,
style: BorderStyle.solid),
),
),
padding: const EdgeInsets.only(left: 0.0, right: 10.0),
Expand All @@ -87,7 +95,8 @@ class LoginScreen2 extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0, right: 00.0),
padding:
EdgeInsets.only(top: 10.0, bottom: 10.0, right: 00.0),
child: Icon(
Icons.alternate_email,
color: this.foregroundColor,
Expand All @@ -108,11 +117,15 @@ class LoginScreen2 extends StatelessWidget {
),
new Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
margin:
const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: this.foregroundColor!, width: 0.5, style: BorderStyle.solid),
bottom: BorderSide(
color: this.foregroundColor!,
width: 0.5,
style: BorderStyle.solid),
),
),
padding: const EdgeInsets.only(left: 0.0, right: 10.0),
Expand All @@ -121,7 +134,8 @@ class LoginScreen2 extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
new Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0, right: 00.0),
padding:
EdgeInsets.only(top: 10.0, bottom: 10.0, right: 00.0),
child: Icon(
Icons.lock_open,
color: this.foregroundColor,
Expand All @@ -143,13 +157,15 @@ class LoginScreen2 extends StatelessWidget {
),
new Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 30.0),
margin:
const EdgeInsets.only(left: 40.0, right: 40.0, top: 30.0),
alignment: Alignment.center,
child: new Row(
children: <Widget>[
new Expanded(
child: new FlatButton(
padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 20.0),
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 20.0),
color: this.highlightColor,
onPressed: () => {},
child: Text(
Expand All @@ -163,18 +179,21 @@ class LoginScreen2 extends StatelessWidget {
),
new Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
margin:
const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
alignment: Alignment.center,
child: new Row(
children: <Widget>[
new Expanded(
child: new FlatButton(
padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 20.0),
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 20.0),
color: Colors.transparent,
onPressed: () => {},
child: Text(
"Forgot your password?",
style: TextStyle(color: this.foregroundColor!.withOpacity(0.5)),
style: TextStyle(
color: this.foregroundColor!.withOpacity(0.5)),
),
),
),
Expand All @@ -186,18 +205,21 @@ class LoginScreen2 extends StatelessWidget {
),
new Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0, bottom: 20.0),
margin: const EdgeInsets.only(
left: 40.0, right: 40.0, top: 10.0, bottom: 20.0),
alignment: Alignment.center,
child: new Row(
children: <Widget>[
new Expanded(
child: new FlatButton(
padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 20.0),
padding: const EdgeInsets.symmetric(
vertical: 20.0, horizontal: 20.0),
color: Colors.transparent,
onPressed: () => {},
child: Text(
"Don't have an account? Create One",
style: TextStyle(color: this.foregroundColor!.withOpacity(0.5)),
style: TextStyle(
color: this.foregroundColor!.withOpacity(0.5)),
),
),
),
Expand Down
63 changes: 54 additions & 9 deletions lib/login_screen_3.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
import 'package:flutter/material.dart';
import 'package:flutter/material.dart'
show
Alignment,
AlwaysScrollableScrollPhysics,
AssetImage,
Axis,
BlendMode,
Border,
BorderRadius,
BorderSide,
BorderStyle,
BoxDecoration,
BoxFit,
BuildContext,
Center,
Color,
ColorFilter,
Colors,
Column,
Container,
CrossAxisAlignment,
Curves,
DecorationImage,
Divider,
EdgeInsets,
Expanded,
FontWeight,
Icon,
IconData,
Icons,
InputBorder,
InputDecoration,
MainAxisAlignment,
MediaQuery,
Padding,
PageController,
PageView,
RoundedRectangleBorder,
Row,
SingleChildScrollView,
State,
StatefulWidget,
Text,
TextAlign,
TextField,
TextStyle,
TickerProviderStateMixin,
Widget;

class LoginScreen3 extends StatefulWidget {
@override
Expand All @@ -7,7 +54,6 @@ class LoginScreen3 extends StatefulWidget {

class _LoginScreen3State extends State<LoginScreen3>
with TickerProviderStateMixin {

//The code is commented because instead of manual scrolling with animation,
//Now PageView is being used

Expand Down Expand Up @@ -478,14 +524,14 @@ class _LoginScreen3State extends State<LoginScreen3>
children: <Widget>[
new Expanded(
child: new FlatButton(
onPressed: ()=>{},
onPressed: () => {},
padding: EdgeInsets.only(
top: 20.0,
bottom: 20.0,
),
child: new Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
children: <Widget>[
Icon(
const IconData(0xea90,
Expand Down Expand Up @@ -532,14 +578,14 @@ class _LoginScreen3State extends State<LoginScreen3>
children: <Widget>[
new Expanded(
child: new FlatButton(
onPressed: ()=>{},
onPressed: () => {},
padding: EdgeInsets.only(
top: 20.0,
bottom: 20.0,
),
child: new Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
children: <Widget>[
Icon(
const IconData(0xea88,
Expand Down Expand Up @@ -648,11 +694,9 @@ class _LoginScreen3State extends State<LoginScreen3>
],
),
),

Divider(
height: 24.0,
),

new Row(
children: <Widget>[
new Expanded(
Expand Down Expand Up @@ -837,7 +881,8 @@ class _LoginScreen3State extends State<LoginScreen3>
);
}

PageController _controller = new PageController(initialPage: 1, viewportFraction: 1.0);
PageController _controller =
new PageController(initialPage: 1, viewportFraction: 1.0);

@override
Widget build(BuildContext context) {
Expand Down
Loading