|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter_ui_nice/const/gradient_const.dart'; |
| 3 | +import 'package:flutter_ui_nice/const/icons.dart'; |
| 4 | +import 'package:flutter_ui_nice/page/signup/widgets/signup_apbar.dart'; |
| 5 | +import 'package:flutter_ui_nice/page/signup/widgets/signup_arrow_button.dart'; |
| 6 | + |
| 7 | +class SignPageFive extends StatefulWidget { |
| 8 | + @override |
| 9 | + _SignPageFiveState createState() => _SignPageFiveState(); |
| 10 | +} |
| 11 | + |
| 12 | +class _SignPageFiveState extends State<SignPageFive> { |
| 13 | + TextEditingController _emailController = TextEditingController(); |
| 14 | + TextEditingController _passwordController = TextEditingController(); |
| 15 | + |
| 16 | + @override |
| 17 | + Widget build(BuildContext context) { |
| 18 | + final double statusbarHeight = MediaQuery.of(context).padding.top; |
| 19 | + final bool isSelected = false; |
| 20 | + return Scaffold( |
| 21 | + resizeToAvoidBottomPadding: false, |
| 22 | + appBar: SignupApbar( |
| 23 | + title: "LOGIN", |
| 24 | + ), |
| 25 | + body: Stack( |
| 26 | + children: <Widget>[ |
| 27 | + Container( |
| 28 | + height: double.infinity, |
| 29 | + width: double.infinity, |
| 30 | + decoration: BoxDecoration( |
| 31 | + gradient: SIGNUP_BACKGROUND, |
| 32 | + ), |
| 33 | + ), |
| 34 | + Stack( |
| 35 | + children: <Widget>[ |
| 36 | + Column( |
| 37 | + children: <Widget>[ |
| 38 | + Container( |
| 39 | + margin: EdgeInsets.only( |
| 40 | + top: 80, |
| 41 | + left: 70, |
| 42 | + ), |
| 43 | + child: Column( |
| 44 | + mainAxisAlignment: MainAxisAlignment.start, |
| 45 | + crossAxisAlignment: CrossAxisAlignment.end, |
| 46 | + children: <Widget>[ |
| 47 | + Row( |
| 48 | + crossAxisAlignment: CrossAxisAlignment.end, |
| 49 | + mainAxisAlignment: MainAxisAlignment.spaceEvenly, |
| 50 | + children: <Widget>[ |
| 51 | + Text( |
| 52 | + "LOGIN", |
| 53 | + style: TextStyle( |
| 54 | + fontSize: 28, |
| 55 | + fontWeight: FontWeight.bold, |
| 56 | + letterSpacing: 1.5, |
| 57 | + wordSpacing: 1.5, |
| 58 | + color: Colors.black87, |
| 59 | + ), |
| 60 | + ), |
| 61 | + Text( |
| 62 | + "SIGNUP", |
| 63 | + style: TextStyle( |
| 64 | + fontSize: 28, |
| 65 | + fontWeight: FontWeight.bold, |
| 66 | + letterSpacing: 1.5, |
| 67 | + wordSpacing: 1.5, |
| 68 | + color: Colors.black26, |
| 69 | + ), |
| 70 | + ), |
| 71 | + ], |
| 72 | + ), |
| 73 | + SizedBox( |
| 74 | + height: 30, |
| 75 | + ), |
| 76 | + Container( |
| 77 | + height: MediaQuery.of(context).size.height / 2 + 50, |
| 78 | + width: double.infinity, |
| 79 | + child: Stack( |
| 80 | + children: <Widget>[ |
| 81 | + Container( |
| 82 | + height: MediaQuery.of(context).size.height / 2, |
| 83 | + width: double.infinity, |
| 84 | + padding: EdgeInsets.all(30), |
| 85 | + decoration: BoxDecoration( |
| 86 | + gradient: SIGNUP_CARD_BACKGROUND, |
| 87 | + borderRadius: BorderRadius.only( |
| 88 | + topLeft: Radius.circular( |
| 89 | + 15, |
| 90 | + ), |
| 91 | + bottomLeft: Radius.circular( |
| 92 | + 15, |
| 93 | + ), |
| 94 | + ), |
| 95 | + color: Colors.red, |
| 96 | + ), |
| 97 | + child: Column( |
| 98 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 99 | + children: <Widget>[ |
| 100 | + SizedBox( |
| 101 | + height: 10, |
| 102 | + ), |
| 103 | + Text( |
| 104 | + "Welcome", |
| 105 | + style: TextStyle( |
| 106 | + fontSize: 40, |
| 107 | + fontWeight: FontWeight.w400, |
| 108 | + wordSpacing: 2, |
| 109 | + letterSpacing: 2, |
| 110 | + ), |
| 111 | + ), |
| 112 | + Text( |
| 113 | + "back!", |
| 114 | + style: TextStyle( |
| 115 | + fontSize: 40, |
| 116 | + fontWeight: FontWeight.w400, |
| 117 | + wordSpacing: 2, |
| 118 | + letterSpacing: 2, |
| 119 | + ), |
| 120 | + ), |
| 121 | + Expanded(child: Container()), |
| 122 | + emailTextFieldWidget(), |
| 123 | + SizedBox( |
| 124 | + height: 1.5, |
| 125 | + child: Container( |
| 126 | + color: Colors.black, |
| 127 | + ), |
| 128 | + ), |
| 129 | + Expanded( |
| 130 | + flex: 3, |
| 131 | + child: passwordTextFieldWidget(), |
| 132 | + ), |
| 133 | + Text( |
| 134 | + "NEXT", |
| 135 | + style: TextStyle( |
| 136 | + fontSize: 14, |
| 137 | + fontWeight: FontWeight.bold), |
| 138 | + ), |
| 139 | + SizedBox( |
| 140 | + height: 15, |
| 141 | + ) |
| 142 | + ], |
| 143 | + ), |
| 144 | + ), |
| 145 | + Positioned( |
| 146 | + bottom: 25, |
| 147 | + left: 30, |
| 148 | + child: SignUpArrowButton( |
| 149 | + icon: IconData( |
| 150 | + arrow_right, |
| 151 | + fontFamily: "Icons", |
| 152 | + ), |
| 153 | + iconSize: 10, |
| 154 | + onTap: () => print("Login tapped"), |
| 155 | + ), |
| 156 | + ), |
| 157 | + ], |
| 158 | + ), |
| 159 | + ), |
| 160 | + ], |
| 161 | + ), |
| 162 | + ), |
| 163 | + ], |
| 164 | + ), |
| 165 | + ], |
| 166 | + ), |
| 167 | + ], |
| 168 | + ), |
| 169 | + ); |
| 170 | + } |
| 171 | + |
| 172 | + Widget emailTextFieldWidget() { |
| 173 | + return TextField( |
| 174 | + controller: _emailController, |
| 175 | + decoration: new InputDecoration( |
| 176 | + suffixIcon: Padding( |
| 177 | + padding: const EdgeInsets.only(right: 30.0), |
| 178 | + child: Icon(IconData(0xe902, fontFamily: 'Icons'), |
| 179 | + color: Color(0xff35AA90), size: 10.0), |
| 180 | + ), |
| 181 | + hintText: 'Email', |
| 182 | + labelStyle: TextStyle( |
| 183 | + fontWeight: FontWeight.w700, |
| 184 | + fontSize: 14, |
| 185 | + ), |
| 186 | + hintStyle: TextStyle( |
| 187 | + fontSize: 14, |
| 188 | + fontWeight: FontWeight.bold, |
| 189 | + ), |
| 190 | + border: InputBorder.none, |
| 191 | + ), |
| 192 | + ); |
| 193 | + } |
| 194 | + |
| 195 | + Widget passwordTextFieldWidget() { |
| 196 | + return TextField( |
| 197 | + controller: _passwordController, |
| 198 | + decoration: new InputDecoration( |
| 199 | + hintText: 'Password', |
| 200 | + labelStyle: TextStyle( |
| 201 | + fontWeight: FontWeight.w600, |
| 202 | + fontSize: 14, |
| 203 | + ), |
| 204 | + hintStyle: TextStyle( |
| 205 | + fontSize: 14, |
| 206 | + fontWeight: FontWeight.bold, |
| 207 | + ), |
| 208 | + border: InputBorder.none, |
| 209 | + ), |
| 210 | + obscureText: true, |
| 211 | + ); |
| 212 | + } |
| 213 | +} |
0 commit comments