FLUTTER -->> CLONE OF TRIVAGO UI LOGIN PAGE
Source Code:
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: TrivagoLoginPage(),
);
}
}
class TrivagoLoginPage extends StatefulWidget {
@override
_TrivagoLoginPageState createState() => _TrivagoLoginPageState();
}
class _TrivagoLoginPageState extends State<TrivagoLoginPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 2.0,
backgroundColor: Colors.white,
actions: <Widget>[
Padding(
padding: EdgeInsets.fromLTRB(80.0, 0.0, 160.0, 0.0),
child: Container(
height: 20.0,
width: 90.0,
child: Row(
children: <Widget>[
Text(
'tri',
style: TextStyle(
color: Colors.blue,
fontSize: 25.0,
fontWeight: FontWeight.bold),
),
Text(
'va',
style: TextStyle(
color: Colors.orange[500],
fontSize: 25.0,
fontWeight: FontWeight.bold),
),
Text(
'go',
style: TextStyle(
color: Colors.red[800],
fontSize: 25.0,
fontWeight: FontWeight.bold),
),
],
),
),
)
],
),
backgroundColor: Colors.white,
body: ListView(
children: <Widget>[
Material(
elevation: 1.0,
child: Container(height: 20.0, color: Colors.grey[200]),
),
Stack(
children: <Widget>[
//SizedBox(height: 20.0),
Padding(
padding: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 0.0),
child: Column(
children: <Widget>[
SizedBox(height: 10.0),
Row(
children: <Widget>[
Text(
'Log in with your email',
style: TextStyle(
color: Colors.grey[600], fontSize: 18.0),
)
],
),
SizedBox(height: 10.0),
Row(
children: <Widget>[
Text(
'Email address',
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold),
)
],
),
SizedBox(height: 5.0),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
height: 20.0,
width: 380.0,
child: TextField(
decoration: InputDecoration(
hintText: 'Email address',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(1),
borderSide: BorderSide(
color: Colors.grey[800],
width: 1.0)))),
)
],
),
SizedBox(height: 60.0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
'Password',
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold),
),
InkWell(
child: Text(
'Forgot your password',
style: TextStyle(
color: Colors.blue,
fontSize: 15.0,
fontWeight: FontWeight.bold),
),
onTap: () {
debugPrint('reset your password');
},
)
],
),
SizedBox(height: 5.0),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
height: 20.0,
width: 380.0,
child: TextField(
decoration: InputDecoration(
hintText: 'Password',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(1),
borderSide: BorderSide(
color: Colors.grey[800],
width: 1.0)))),
)
],
),
SizedBox(height: 30.0),
Row(
children: <Widget>[
IconButton(
onPressed: () {}, icon: Icon(Icons.check_box)),
Text(
'Show my password',
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
),
),
],
),
SizedBox(height: 10.0),
Material(
elevation: 0.0,
color: Colors.blue[800],
shape: OutlineInputBorder(
borderRadius: BorderRadius.circular(1),
borderSide: BorderSide(color: Colors.blue[800])),
child: Container(
height: 50.0,
width: 380.0,
child: Row(
children: <Widget>[
SizedBox(width: 10.0),
Icon(Icons.security),
SizedBox(width: 110.0),
InkWell(
child: Text(
'Log in',
style: TextStyle(
color: Colors.white,
fontSize: 18.0,
fontWeight: FontWeight.bold),
),
onTap: () {
debugPrint('Log in');
},
)
],
),
),
),
SizedBox(height: 10.0),
Container(
width: 380.0,
child: Divider(
color: Colors.grey[800],
),
),
SizedBox(
height: 10.0,
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
"Don't have an account?",
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold),
),
SizedBox(width: 5.0),
InkWell(
child: Text(
'Sign Up',
style: TextStyle(
color: Colors.blue,
fontSize: 15.0,
fontWeight: FontWeight.bold),
),
onTap: () {
debugPrint('Sign Up');
},
)
],
),
SizedBox(height: 10.0),
Row(
children: <Widget>[
Container(
width: 190.0,
child: Divider(
color: Colors.grey[800],
),
),
SizedBox(width: 5.0),
Text('or'),
SizedBox(width: 5.0),
Container(
width: 165.0,
child: Divider(
color: Colors.grey[800],
),
),
],
),
SizedBox(height: 10.0),
Material(
elevation: 0.0,
color: Colors.blue[800],
shape: OutlineInputBorder(
borderRadius: BorderRadius.circular(1),
borderSide: BorderSide(color: Colors.blue[800])),
child: Container(
height: 50.0,
width: 380.0,
child: InkWell(
child: Center(
child: Text(
'Facebook',
style: TextStyle(
color: Colors.white,
fontSize: 18.0,
fontWeight: FontWeight.bold),
),
),
onTap: () {
debugPrint('login with FB');
},
)),
),
],
),
)
],
)
],
),
);
}
}
No comments:
Post a Comment