Professional Documents
Culture Documents
Name:
Sidra Saleem
Reg#
SP17-BCS-108
Submitted to:
Sir Muhammad Abdullah
Subject:
MAD
import 'package:day14/Animation/FadeAnimation.dart';
import 'package:flutter/material.dart';
MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
@override
return Scaffold(
body: Container(
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
colors: [
Colors.orange[900],
Colors.orange[800],
Colors.orange[400]
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 80,),
Padding(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 10,),
],
),
),
SizedBox(height: 20),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: <Widget>[
SizedBox(height: 60,),
FadeAnimation(1.4, Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(
blurRadius: 20,
)]
),
child: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Colors.grey[200]))
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none
),
),
),
Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
),
child: TextField(
decoration: InputDecoration(
hintText: "Password",
border: InputBorder.none
),
),
),
],
),
)),
SizedBox(height: 40,),
SizedBox(height: 40,),
FadeAnimation(1.6, Container(
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.orange[900]
),
child: Center(
),
)),
SizedBox(height: 50,),
SizedBox(height: 30,),
Row(
children: <Widget>[
Expanded(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.blue
),
child: Center(
),
)),
),
SizedBox(width: 30,),
Expanded(
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(50),
color: Colors.black
),
child: Center(
),
)),
)
],
],
),
),
),
),
],
),
),
);
}
Sign Up code:
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('My App'),
),
body: Padding(
padding: EdgeInsets.all(10),
child: ListView(
children: <Widget>[
Container(
alignment: Alignment.center,
padding: EdgeInsets.all(10),
child: Text(
'Please enter your data',
style: TextStyle(
color: Colors.redAccent,
fontWeight: FontWeight.w500,
fontSize: 30),
)),
Container(
alignment: Alignment.center,
padding: EdgeInsets.all(10),
child: Text(
'Sign Up',
style: TextStyle(fontSize: 20),
)),
Container(
padding: EdgeInsets.all(10),
child: TextField(
controller: nameController,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'First Name',
),
),
),
Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
child: TextField(
obscureText: true,
controller: passwordController,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Last Name',
),
),
),
FlatButton(
onPressed: (){
//forgot password screen
},
textColor: Colors.black54,
child: Text('Login with google'),
),
Container(
height: 50,
padding:
EdgeInsets.fromLTRB(10, 0,
10, 0),
child:
RaisedButton(
textColor: Colors.white,
color:
Colors.redAccent,
child:
Text('Signup'),
onPressed: () {
print(nameController.text);
print(passwordController.te
xt);
},
)),
Container(
child:
Row(
children: <Widget>[
FlatButton(
textColor:
Colors.redAccent,
child: Text(
'Sign in',
style: TextStyle(fontSize:
20),
),
onPressed: () {
//signup screen
},
)
],
mainAxisAlignment:
MainAxisAlignment.center,
))
],
)));
}
}