|
| 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/const/images_const.dart'; |
| 5 | +import 'package:flutter_ui_nice/page/signup/widgets/signup_6_box.dart'; |
| 6 | +import 'package:flutter_ui_nice/page/signup/widgets/signup_arrow_button.dart'; |
| 7 | +import 'package:flutter_ui_nice/page/signup/widgets/signup_const.dart'; |
| 8 | + |
| 9 | +class SignPageEight extends StatefulWidget { |
| 10 | + @override |
| 11 | + _SignPageEightState createState() => _SignPageEightState(); |
| 12 | +} |
| 13 | + |
| 14 | +class _SignPageEightState extends State<SignPageEight> { |
| 15 | + @override |
| 16 | + Widget build(BuildContext context) { |
| 17 | + final _media = MediaQuery.of(context).size; |
| 18 | + List<Widget> stackChildren = [ |
| 19 | + buildBackgroundImage(), |
| 20 | + SignupSixBox( |
| 21 | + boxHeight: _media.height, |
| 22 | + boxWidth: _media.width, |
| 23 | + boxPadding: _media.width / 2 - 20, |
| 24 | + child: Padding( |
| 25 | + padding: const EdgeInsets.symmetric(vertical: 28.0, horizontal: 30), |
| 26 | + child: Text( |
| 27 | + "GOOGLE PLUS", |
| 28 | + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500), |
| 29 | + ), |
| 30 | + ), |
| 31 | + boxGradient: SIGNUP_SIX_GOOGLEP_BG, |
| 32 | + ), |
| 33 | + SignupSixBox( |
| 34 | + boxHeight: _media.height / 2.5, |
| 35 | + boxWidth: _media.width, |
| 36 | + boxPadding: _media.width / 2 - 80, |
| 37 | + child: Padding( |
| 38 | + padding: const EdgeInsets.symmetric(vertical: 28.0, horizontal: 30), |
| 39 | + child: Text( |
| 40 | + "TWITTER", |
| 41 | + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500), |
| 42 | + ), |
| 43 | + ), |
| 44 | + boxGradient: SIGNUP_SIX_TWITTER_BG, |
| 45 | + ), |
| 46 | + SignupSixBox( |
| 47 | + boxHeight: _media.height / 3.4, |
| 48 | + boxWidth: _media.width, |
| 49 | + boxPadding: _media.width / 2 - 140, |
| 50 | + child: Padding( |
| 51 | + padding: const EdgeInsets.symmetric(vertical: 28.0, horizontal: 30), |
| 52 | + child: Text( |
| 53 | + "FACEBOOK", |
| 54 | + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w500), |
| 55 | + ), |
| 56 | + ), |
| 57 | + boxGradient: SIGNUP_SIX_FACEBOOK_BG, |
| 58 | + ), |
| 59 | + mainLoginStack(), |
| 60 | + ]; |
| 61 | + |
| 62 | + return Scaffold( |
| 63 | + body: Stack( |
| 64 | + children: stackChildren, |
| 65 | + ), |
| 66 | + ); |
| 67 | + } |
| 68 | + |
| 69 | + Container buildBackgroundImage() { |
| 70 | + return Container( |
| 71 | + width: double.infinity, |
| 72 | + decoration: BoxDecoration( |
| 73 | + image: DecorationImage( |
| 74 | + image: AssetImage(SignUpImagePath.SignUpPage_8_Bg), |
| 75 | + fit: BoxFit.contain, |
| 76 | + alignment: Alignment.bottomRight, |
| 77 | + ), |
| 78 | + ), |
| 79 | + ); |
| 80 | + } |
| 81 | + |
| 82 | + Stack mainLoginStack() { |
| 83 | + final _media = MediaQuery.of(context).size; |
| 84 | + return Stack( |
| 85 | + children: <Widget>[ |
| 86 | + Container( |
| 87 | + height: _media.height / 1.45, |
| 88 | + width: _media.width, |
| 89 | + decoration: BoxDecoration( |
| 90 | + gradient: SIGNUP_BACKGROUND, |
| 91 | + borderRadius: BorderRadius.only( |
| 92 | + bottomRight: Radius.circular(15), |
| 93 | + ), |
| 94 | + boxShadow: [ |
| 95 | + BoxShadow( |
| 96 | + color: Colors.black12, |
| 97 | + blurRadius: 15, |
| 98 | + spreadRadius: 8, |
| 99 | + ), |
| 100 | + ], |
| 101 | + ), |
| 102 | + ), |
| 103 | + Padding( |
| 104 | + padding: const EdgeInsets.only(top: 60.0), |
| 105 | + child: Column( |
| 106 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 107 | + mainAxisAlignment: MainAxisAlignment.start, |
| 108 | + children: <Widget>[ |
| 109 | + Center( |
| 110 | + child: Image.asset( |
| 111 | + SignUpImagePath.SignUpLogo, |
| 112 | + height: _media.height / 6, |
| 113 | + ), |
| 114 | + ), |
| 115 | + Row( |
| 116 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 117 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 118 | + children: <Widget>[ |
| 119 | + Expanded( |
| 120 | + child: Container( |
| 121 | + padding: const EdgeInsets.only(left: 30.0, right: 10), |
| 122 | + child: Column( |
| 123 | + children: <Widget>[ |
| 124 | + SizedBox( |
| 125 | + height: 30, |
| 126 | + ), |
| 127 | + Text( |
| 128 | + "Log In", |
| 129 | + style: TextStyle( |
| 130 | + fontSize: 30, |
| 131 | + fontWeight: FontWeight.w300, |
| 132 | + ), |
| 133 | + ), |
| 134 | + SizedBox( |
| 135 | + height: 40, |
| 136 | + ), |
| 137 | + SizedBox( |
| 138 | + height: 100, |
| 139 | + width: MediaQuery.of(context).size.width / 2 - 20, |
| 140 | + child: Text( |
| 141 | + "Lorem ntempor quam, et lania sapien dolorsamet", |
| 142 | + style: TextStyle( |
| 143 | + fontSize: 14, |
| 144 | + fontWeight: FontWeight.w500, |
| 145 | + ), |
| 146 | + softWrap: true, |
| 147 | + textAlign: TextAlign.left, |
| 148 | + overflow: TextOverflow.clip, |
| 149 | + ), |
| 150 | + ), |
| 151 | + Align( |
| 152 | + alignment: Alignment.center, |
| 153 | + child: SignUpArrowButton( |
| 154 | + height: 55, |
| 155 | + width: 55, |
| 156 | + icon: IconData(arrow_right, fontFamily: 'Icons'), |
| 157 | + iconSize: 10, |
| 158 | + ), |
| 159 | + ), |
| 160 | + ], |
| 161 | + mainAxisAlignment: MainAxisAlignment.start, |
| 162 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 163 | + ), |
| 164 | + ), |
| 165 | + ), |
| 166 | + Expanded( |
| 167 | + child: Container( |
| 168 | + padding: const EdgeInsets.only(left: 20.0, right: 15), |
| 169 | + width: MediaQuery.of(context).size.width / 2, |
| 170 | + height: _media.height / 2 - 44, |
| 171 | + decoration: BoxDecoration( |
| 172 | + gradient: LinearGradient( |
| 173 | + begin: FractionalOffset.topRight, |
| 174 | + end: FractionalOffset.bottomRight, |
| 175 | +// Add one stop for each color. Stops should increase from 0 to 1 |
| 176 | + stops: [0.3, 1], |
| 177 | + colors: [ |
| 178 | + Colors.transparent, |
| 179 | + Colors.black12, |
| 180 | + ], |
| 181 | + ), |
| 182 | + borderRadius: BorderRadius.only( |
| 183 | + bottomRight: Radius.circular(15), |
| 184 | + ), |
| 185 | + ), |
| 186 | + child: Column( |
| 187 | + mainAxisAlignment: MainAxisAlignment.start, |
| 188 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 189 | + children: <Widget>[ |
| 190 | + SizedBox( |
| 191 | + height: 30, |
| 192 | + ), |
| 193 | + Text( |
| 194 | + "Sign Up", |
| 195 | + style: TextStyle( |
| 196 | + fontSize: 30, |
| 197 | + fontWeight: FontWeight.w300, |
| 198 | + ), |
| 199 | + textAlign: TextAlign.center, |
| 200 | + ), |
| 201 | + SizedBox( |
| 202 | + height: 40, |
| 203 | + ), |
| 204 | + SizedBox( |
| 205 | + height: 100, |
| 206 | + width: MediaQuery.of(context).size.width / 2 - 20, |
| 207 | + child: Text( |
| 208 | + "Lorem ipsum dolor sit amet, consectador.", |
| 209 | + style: TextStyle( |
| 210 | + fontSize: 14, |
| 211 | + fontWeight: FontWeight.w500, |
| 212 | + ), |
| 213 | + textAlign: TextAlign.left, |
| 214 | + overflow: TextOverflow.clip, |
| 215 | + ), |
| 216 | + ), |
| 217 | + Align( |
| 218 | + alignment: Alignment.center, |
| 219 | + child: SignUpArrowButton( |
| 220 | + height: 55, |
| 221 | + width: 55, |
| 222 | + icon: IconData(arrow_right, fontFamily: 'Icons'), |
| 223 | + iconSize: 10, |
| 224 | + ), |
| 225 | + ), |
| 226 | + ], |
| 227 | + ), |
| 228 | + ), |
| 229 | + ), |
| 230 | + ], |
| 231 | + ) |
| 232 | + ], |
| 233 | + ), |
| 234 | + ), |
| 235 | + ], |
| 236 | + ); |
| 237 | + } |
| 238 | +} |
0 commit comments