Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- class LoginScreen3 extends StatefulWidget {
- @override
- _LoginScreen3State createState() => new _LoginScreen3State();
- }
- class _LoginScreen3State extends State<LoginScreen3>
- with TickerProviderStateMixin {
- @override
- void initState() {
- super.initState();
- }
- Widget HomePage() {
- return new Container(
- height: MediaQuery.of(context).size.height,
- decoration: BoxDecoration(
- color: Colors.redAccent,
- image: DecorationImage(
- colorFilter: new ColorFilter.mode(
- Colors.black.withOpacity(0.1), BlendMode.dstATop),
- image: AssetImage('assets/images/mountains.jpg'),
- fit: BoxFit.cover,
- ),
- ),
- child: new Column(
- children: <Widget>[
- Container(
- padding: EdgeInsets.only(top: 250.0),
- child: Center(
- child: Icon(
- Icons.person_pin,
- color: Colors.white,
- size: 100.0,
- ),
- ),
- ),
- Container(
- padding: EdgeInsets.only(top: 20.0),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Text(
- "الوصول الحكومي",
- style: TextStyle(
- color: Colors.white,
- fontSize: 20.0,
- ),
- ),
- Text(
- " نموذج",
- style: TextStyle(
- color: Colors.white,
- fontSize: 20.0,
- fontWeight: FontWeight.bold),
- ),
- ],
- ),
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 150.0),
- alignment: Alignment.center,
- child: new Row(
- children: <Widget>[
- new Expanded(
- child: new OutlineButton(
- shape: new RoundedRectangleBorder(
- borderRadius: new BorderRadius.circular(30.0)),
- color: Colors.redAccent,
- highlightedBorderColor: Colors.white,
- onPressed: () => gotoSignup(),
- child: new Container(
- padding: const EdgeInsets.symmetric(
- vertical: 20.0,
- horizontal: 20.0,
- ),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new Expanded(
- child: Text(
- "إنشاء حساب جديد",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.bold),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 30.0),
- alignment: Alignment.center,
- child: new Row(
- children: <Widget>[
- new Expanded(
- child: new FlatButton(
- shape: new RoundedRectangleBorder(
- borderRadius: new BorderRadius.circular(30.0)),
- color: Colors.white,
- onPressed: () => gotoLogin(),
- child: new Container(
- padding: const EdgeInsets.symmetric(
- vertical: 20.0,
- horizontal: 20.0,
- ),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new Expanded(
- child: Text(
- "تسجيل الدخول",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.redAccent,
- fontWeight: FontWeight.bold),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- );
- }
- Widget LoginPage() {
- return new Container(
- height: MediaQuery.of(context).size.height,
- decoration: BoxDecoration(
- color: Colors.white,
- image: DecorationImage(
- colorFilter: new ColorFilter.mode(
- Colors.black.withOpacity(0.05), BlendMode.dstATop),
- image: AssetImage('assets/images/mountains.jpg'),
- fit: BoxFit.cover,
- ),
- ),
- child: new Column(
- children: <Widget>[
- Container(
- padding: EdgeInsets.all(120.0),
- child: Center(
- child: Icon(
- Icons.headset_mic,
- color: Colors.redAccent,
- size: 50.0,
- ),
- ),
- ),
- new Row(
- children: <Widget>[
- new Expanded(
- child: new Padding(
- padding: const EdgeInsets.only(right: 40.0),
- child: new Text(
- "الرقم القومي",
- textDirection: TextDirection.rtl,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- ),
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(
- color: Colors.redAccent,
- width: 0.5,
- style: BorderStyle.solid),
- ),
- ),
- padding: const EdgeInsets.only(left: 0.0, right: 10.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- new Expanded(
- child: TextField(
- obscureText: true,
- textAlign: TextAlign.left,
- decoration: InputDecoration(
- border: InputBorder.none,
- hintText: '297XXXXXXXXXXX',
- hintStyle: TextStyle(color: Colors.grey),
- ),
- ),
- ),
- ],
- ),
- ),
- Divider(
- height: 24.0,
- ),
- new Row(
- children: <Widget>[
- new Expanded(
- child: new Padding(
- padding: const EdgeInsets.only(right: 40.0),
- child: new Text(
- "كلمة السر",
- textDirection: TextDirection.rtl,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- ),
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(
- color: Colors.redAccent,
- width: 0.5,
- style: BorderStyle.solid),
- ),
- ),
- padding: const EdgeInsets.only(left: 0.0, right: 10.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- new Expanded(
- child: TextField(
- obscureText: true,
- textAlign: TextAlign.left,
- decoration: InputDecoration(
- border: InputBorder.none,
- hintText: '*********',
- hintStyle: TextStyle(color: Colors.grey),
- ),
- ),
- ),
- ],
- ),
- ),
- Divider(
- height: 24.0,
- ),
- new Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.only(right: 20.0),
- child: new FlatButton(
- child: new Text(
- "نسيت كلمة المرور؟",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- textAlign: TextAlign.end,
- ),
- onPressed: () => {},
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 20.0),
- alignment: Alignment.center,
- child: new Row(
- children: <Widget>[
- new Expanded(
- child: new FlatButton(
- shape: new RoundedRectangleBorder(
- borderRadius: new BorderRadius.circular(30.0),
- ),
- color: Colors.redAccent,
- onPressed: () => {},
- child: new Container(
- padding: const EdgeInsets.symmetric(
- vertical: 20.0,
- horizontal: 20.0,
- ),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new Expanded(
- child: Text(
- "الدخول",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.bold),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- ),],
- ),
- );
- }
- Widget SignupPage() {
- return new ListView(
- children: <Widget>[
- Container(
- padding: EdgeInsets.all(10.0),
- child: Center(
- child: Icon(
- Icons.person_pin,
- color: Colors.redAccent,
- size: 30.0,
- ),
- ),
- ),
- new Text(
- "بيانات المولود",
- textAlign: TextAlign.center,
- style: new TextStyle(
- color: Colors.blue,
- fontSize: 20,
- fontWeight: FontWeight.bold,
- ),
- ),
- new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new Radio(
- value: 0,
- activeColor: Colors.red,
- ),
- new Text(
- 'ذكر',
- style: new TextStyle(fontSize: 16.0),
- ),
- new Radio(
- value: 1,
- ),
- new Text(
- 'أنثي',
- style: new TextStyle(
- fontSize: 16.0,
- ),
- ),
- ],
- ),
- new Row(
- children: <Widget>[
- new Expanded(
- child: new Padding(
- padding: const EdgeInsets.only(left: 40.0),
- child: new Text(
- "محل الولادة",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- ),
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(
- color: Colors.redAccent,
- width: 0.5,
- style: BorderStyle.solid),
- ),
- ),
- padding: const EdgeInsets.only(left: 0.0, right: 10.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- new Expanded(
- child: TextField(
- obscureText: true,
- textAlign: TextAlign.left,
- decoration: InputDecoration(
- border: InputBorder.none,
- hintText: 'samarthagarwal@live.com',
- hintStyle: TextStyle(color: Colors.grey),
- ),
- ),
- ),
- ],
- ),
- ),
- Divider(
- height: 24.0,
- ),
- new Row(
- children: <Widget>[
- new Expanded(
- child: new Padding(
- padding: const EdgeInsets.only(left: 40.0),
- child: new Text(
- "تاريخ الميلاد",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- ),
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(
- color: Colors.redAccent,
- width: 0.5,
- style: BorderStyle.solid),
- ),
- ),
- padding: const EdgeInsets.only(left: 0.0, right: 10.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- new Expanded(
- child: TextField(
- obscureText: true,
- textAlign: TextAlign.left,
- decoration: InputDecoration(
- border: InputBorder.none,
- hintText: '*********',
- hintStyle: TextStyle(color: Colors.grey),
- ),
- ),
- ),
- ],
- ),
- ),
- Divider(
- height: 24.0,
- ),
- new Row(
- children: <Widget>[
- new Expanded(
- child: new Padding(
- padding: const EdgeInsets.only(left: 40.0),
- child: new Text(
- "CONFIRM PASSWORD",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- ),
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(
- color: Colors.redAccent,
- width: 0.5,
- style: BorderStyle.solid),
- ),
- ),
- padding: const EdgeInsets.only(left: 0.0, right: 10.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.start,
- children: <Widget>[
- new Expanded(
- child: TextField(
- obscureText: true,
- textAlign: TextAlign.left,
- decoration: InputDecoration(
- border: InputBorder.none,
- hintText: '*********',
- hintStyle: TextStyle(color: Colors.grey),
- ),
- ),
- ),
- ],
- ),
- ),
- Divider(
- height: 24.0,
- ),
- new Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.only(right: 20.0),
- child: new FlatButton(
- child: new Text(
- "Already have an account?",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- color: Colors.redAccent,
- fontSize: 15.0,
- ),
- textAlign: TextAlign.end,
- ),
- onPressed: () => {},
- ),
- ),
- ],
- ),
- new Container(
- width: MediaQuery.of(context).size.width,
- margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 50.0),
- alignment: Alignment.center,
- child: new Row(
- children: <Widget>[
- new Expanded(
- child: new FlatButton(
- shape: new RoundedRectangleBorder(
- borderRadius: new BorderRadius.circular(30.0),
- ),
- color: Colors.redAccent,
- onPressed: () => {},
- child: new Container(
- padding: const EdgeInsets.symmetric(
- vertical: 20.0,
- horizontal: 20.0,
- ),
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new Expanded(
- child: Text(
- "SIGN UP",
- textAlign: TextAlign.center,
- style: TextStyle(
- color: Colors.white,
- fontWeight: FontWeight.bold),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- );
- }
- gotoLogin() {
- //controller_0To1.forward(from: 0.0);
- _controller.animateToPage(
- 0,
- duration: Duration(milliseconds: 800),
- curve: Curves.bounceOut,
- );
- }
- gotoSignup() {
- //controller_minus1To0.reverse(from: 0.0);
- _controller.animateToPage(
- 2,
- duration: Duration(milliseconds: 800),
- curve: Curves.bounceOut,
- );
- }
- PageController _controller =
- new PageController(initialPage: 1, viewportFraction: 1.0);
- @override
- Widget build(BuildContext context) {
- return Container(
- height: MediaQuery.of(context).size.height,
- child: PageView(
- controller: _controller,
- physics: new AlwaysScrollableScrollPhysics(),
- children: <Widget>[LoginPage(), HomePage(), SignupPage()],
- scrollDirection: Axis.horizontal,
- ));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement