From ad6be3242792051b1c49c9356b378acb08ce3d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cagri=20Akgu=CC=88l?= Date: Wed, 26 Dec 2018 16:38:41 +0100 Subject: [PATCH 1/2] Signup Three Pagee added --- lib/main.dart | 3 +- lib/page/signup/SignPageThree.dart | 257 +++++++++++++++++++++++++++++ 2 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 lib/page/signup/SignPageThree.dart diff --git a/lib/main.dart b/lib/main.dart index 100358c..03bd549 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_ui_nice/page/page_const.dart'; import 'package:flutter_ui_nice/page/signup/SignPageFour.dart'; +import 'package:flutter_ui_nice/page/signup/SignPageThree.dart'; import 'const/string_const.dart'; import 'const/color_const.dart'; import 'const/page_str_const.dart'; @@ -24,7 +25,7 @@ class MyApp extends StatelessWidget { routes: { SIGN_UP_PAGES[0]: (context) => SignPageOne(), SIGN_UP_PAGES[1]: (context) => SignPageTwo(), - //SIGN_UP_PAGES[2]: (context) => SignPageThird(), + SIGN_UP_PAGES[2]: (context) => SignPageThree(), SIGN_UP_PAGES[3]: (context) => SignPageFour(), //FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager }, diff --git a/lib/page/signup/SignPageThree.dart b/lib/page/signup/SignPageThree.dart new file mode 100644 index 0000000..31cd635 --- /dev/null +++ b/lib/page/signup/SignPageThree.dart @@ -0,0 +1,257 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_ui_nice/const/color_const.dart'; +import 'package:flutter_ui_nice/const/gradient_const.dart'; +import 'package:flutter_ui_nice/const/images_const.dart'; +import 'package:flutter_ui_nice/const/size_const.dart'; +import 'package:flutter_ui_nice/const/string_const.dart'; +import 'dart:io'; + +import 'package:flutter_ui_nice/page/signup/widgets/signup_arrow_button.dart'; + +class SignPageThree extends StatefulWidget { + @override + _SignPageThreeState createState() => _SignPageThreeState(); +} + +class _SignPageThreeState extends State { + TextEditingController _username = TextEditingController(); + TextEditingController _password = TextEditingController(); + + @override + Widget build(BuildContext context) { + final _media = MediaQuery.of(context).size; + return Scaffold( + body: Container( + height: double.infinity, + width: double.infinity, + decoration: BoxDecoration( + gradient: SIGNUP_BACKGROUND, + ), + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + vertical: 60, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center(child: Image.asset( + SignUpImagePath.SignUpLogo, + height: _media.height/7, + ),), + Row( + children: [ + Container( + height: _media.height/1.7, + width: _media.width/1.25, + + decoration: BoxDecoration( + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + gradient: SIGNUP_CARD_BACKGROUND, + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + + ), + child: Padding( + padding: EdgeInsets.only(left: 40,top: 60), + child: new Column( + crossAxisAlignment: CrossAxisAlignment.start, + + children: [ + Text( + 'Log in', + style: TextStyle( + fontFamily: "Montserrat", + fontWeight: FontWeight.w300, + fontSize: 40), + ), + Text( + 'to continue..', + style: TextStyle( + fontFamily: "Montserrat", + fontWeight: FontWeight.w300, + fontSize: 40), + ), + SizedBox(height: 40,), + inputText("Username", + _username, false), + Divider( + height: 5, + color: Colors.black, + ), + inputText( + "Password", _password, true), + + + + + + ], + ), + ), + + ), + Opacity( + opacity: 0.6, + child: new Container( + height: _media.height/1.7-20, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + + ), + ), + ), + Opacity( + opacity: 0.4, + child: new Container( + height: _media.height/1.7-40, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + + ), + ), + ), + Opacity( + opacity: 0.2, + child: new Container( + height: _media.height/1.7-60, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + + ), + ), + ) + ], + ), + + Padding( + padding: EdgeInsets.symmetric(vertical: 60), + child: Row( + + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + StringConst.SIGN_UP_TEXT, + style: TextStyle(color: MAIN_COLOR), + ), + SizedBox( + width: 5, + ), + GestureDetector( + onTap: () => print("Sign Up Tapped"), + child: Text( StringConst.SIGN_UP), + ), + ], + ), + ), + SizedBox( + height: 50, + ) + + ], + ), + ), + + + + Positioned( + + top: _media.height/1.7+_media.height/7+30, + left: 20, + child: SignUpArrowButton( + icon: Icons.arrow_forward, + iconSize: 26, + onTap: () => print("Signup Tapped"), + ) + + ), + Positioned( + + top: _media.height/1.7+_media.height/7-10, + left: 40, + child: Text( + 'Next', + style: TextStyle( + fontFamily: "Montserrat", + fontWeight: FontWeight.w800, + fontSize: 16), + ), + + ), + + + + + + + + + + ], + ), + ), + ), + ); + } +} + +Widget inputText( + + String hintText, + TextEditingController controller, + bool obSecure, + ) { + return TextField( + style: TextStyle(height: 1.3), + controller: controller, + decoration: InputDecoration( + hintText: hintText, + + labelStyle: TextStyle( + fontSize: TEXT_NORMAL_SIZE, + fontFamily: "Montserrat", + fontWeight: FontWeight.w400, + letterSpacing: 1, + height: 0, + ), + border: InputBorder.none, + ), + obscureText: obSecure, + ); +} From 39d72dc9eabb5980040a1e25883dd324decca2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cagri=20Akgu=CC=88l?= Date: Thu, 27 Dec 2018 10:54:30 +0100 Subject: [PATCH 2/2] Fit problem --- lib/page/signup/SignPageThree.dart | 96 ++++++++++++++++-------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/lib/page/signup/SignPageThree.dart b/lib/page/signup/SignPageThree.dart index 31cd635..fdbc700 100644 --- a/lib/page/signup/SignPageThree.dart +++ b/lib/page/signup/SignPageThree.dart @@ -99,60 +99,66 @@ class _SignPageThreeState extends State { ), ), - Opacity( - opacity: 0.6, - child: new Container( - height: _media.height/1.7-20, - width: 25, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), - boxShadow: [ - BoxShadow( - color: Colors.black12, - blurRadius: 15, - spreadRadius: 8, - ), - ], + Flexible( + child: Opacity( + opacity: 0.6, + child: new Container( + height: _media.height/1.7-20, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + ), ), ), ), - Opacity( - opacity: 0.4, - child: new Container( - height: _media.height/1.7-40, - width: 25, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), - boxShadow: [ - BoxShadow( - color: Colors.black12, - blurRadius: 15, - spreadRadius: 8, - ), - ], + Flexible( + child: Opacity( + opacity: 0.4, + child: new Container( + height: _media.height/1.7-40, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + ), ), ), ), - Opacity( - opacity: 0.2, - child: new Container( - height: _media.height/1.7-60, - width: 25, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), - boxShadow: [ - BoxShadow( - color: Colors.black12, - blurRadius: 15, - spreadRadius: 8, - ), - ], + Flexible( + child: Opacity( + opacity: 0.2, + child: new Container( + height: _media.height/1.7-60, + width: 25, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topRight: Radius.circular(15),bottomRight: Radius.circular(15)), + boxShadow: [ + BoxShadow( + color: Colors.black12, + blurRadius: 15, + spreadRadius: 8, + ), + ], + ), ), ), )