고원빈

[fronrtend] 작업 중

...@@ -17,7 +17,7 @@ class _DashBoardState extends State<DashBoard> { ...@@ -17,7 +17,7 @@ class _DashBoardState extends State<DashBoard> {
17 title: Text('Welcome to Flutter'), 17 title: Text('Welcome to Flutter'),
18 ), 18 ),
19 body: Center( 19 body: Center(
20 - child: Text('Hello World'), 20 + child: Text('DashBoard 작업 영역'),
21 ), 21 ),
22 ), 22 ),
23 ); 23 );
......
...@@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; ...@@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
3 import '../shared/colors.dart'; 3 import '../shared/colors.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
5 import './SignInPage.dart'; 5 import './SignInPage.dart';
6 +import './SignUpPage.dart';
6 7
7 class HomePage extends StatefulWidget { 8 class HomePage extends StatefulWidget {
8 final String pageTitle; 9 final String pageTitle;
...@@ -124,7 +125,7 @@ class _HomePageState extends State<HomePage> { ...@@ -124,7 +125,7 @@ class _HomePageState extends State<HomePage> {
124 context, 125 context,
125 MaterialPageRoute( 126 MaterialPageRoute(
126 builder: (BuildContext context) => 127 builder: (BuildContext context) =>
127 - SignInPage(), 128 + SignUpPage(),
128 )); 129 ));
129 }, 130 },
130 child: Text( 131 child: Text(
......
1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:flutter/services.dart'; 2 import 'package:flutter/services.dart';
3 +import '../shared/styles.dart';
3 import '../shared/colors.dart'; 4 import '../shared/colors.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
6 +import 'package:page_transition/page_transition.dart';
7 +import '../shared/inputFields.dart';
8 +import './SignInPage.dart';
9 +import './DashBoard.dart';
5 10
6 class SignUpPage extends StatefulWidget { 11 class SignUpPage extends StatefulWidget {
12 + final String pageTitle;
13 +
14 + SignUpPage({Key key, this.pageTitle}) : super(key: key);
15 +
7 @override 16 @override
8 _SignUpPageState createState() => _SignUpPageState(); 17 _SignUpPageState createState() => _SignUpPageState();
9 } 18 }
10 19
11 class _SignUpPageState extends State<SignUpPage> { 20 class _SignUpPageState extends State<SignUpPage> {
21 + @override
12 Widget build(BuildContext context) { 22 Widget build(BuildContext context) {
13 - return MaterialApp( 23 + return Scaffold(
14 - title: 'Welcome to Flutter',
15 - home: Scaffold(
16 appBar: AppBar( 24 appBar: AppBar(
17 - title: Text('Welcome to Flutter'), 25 + elevation: 0,
18 - ), 26 + backgroundColor: white,
19 - body: Center( 27 + title: Text('Sign Up',
20 - child: Text('Hello World'), 28 + style: TextStyle(
29 + color: Colors.grey, fontFamily: 'Poppins', fontSize: 15)),
30 + actions: <Widget>[
31 + FlatButton(
32 + onPressed: () {
33 + // Navigator.of(context).pushNamed('/signin');
34 + Navigator.push(
35 + context,
36 + PageTransition(
37 + type: PageTransitionType.rightToLeft,
38 + child: SignInPage()));
39 + },
40 + child: Text('Sign In', style: contrastText),
41 + )
42 + ],
21 ), 43 ),
22 - ), 44 + body: ListView(
23 - ); 45 + shrinkWrap: true,
46 + children: <Widget>[
47 + Container(
48 + padding: EdgeInsets.only(left: 18, right: 18),
49 + child: Stack(
50 + children: <Widget>[
51 + Column(
52 + mainAxisAlignment: MainAxisAlignment.start,
53 + crossAxisAlignment: CrossAxisAlignment.start,
54 + children: <Widget>[
55 + Text('Welcome to Fryo!', style: h3),
56 + Text('Let\'s get started', style: taglineText),
57 + fryoTextInput('Username'),
58 + fryoTextInput('Full Name'),
59 + fryoEmailInput('Email Address'),
60 + fryoPasswordInput('Password')
61 + ],
62 + ),
63 + Positioned(
64 + bottom: 15,
65 + right: -15,
66 + child: FlatButton(
67 + onPressed: () {
68 + Navigator.push(
69 + context,
70 + PageTransition(
71 + type: PageTransitionType.rightToLeft,
72 + child: DashBoard()));
73 + },
74 + color: primaryColor,
75 + padding: EdgeInsets.all(13),
76 + shape: CircleBorder(),
77 + child: Icon(Icons.arrow_forward, color: white),
78 + ),
79 + )
80 + ],
81 + ),
82 + height: 360,
83 + width: double.infinity,
84 + decoration: authPlateDecoration,
85 + ),
86 + ],
87 + ));
24 } 88 }
25 } 89 }
......
1 +import 'package:flutter/material.dart';
2 +import './colors.dart';
3 +import './styles.dart';
4 +
5 +Container fryoTextInput(String hintText,
6 + {onTap, onChanged, onEditingComplete, onSubmitted}) {
7 + return Container(
8 + margin: EdgeInsets.only(top: 13),
9 + child: TextField(
10 + onTap: onTap,
11 + onChanged: onChanged,
12 + onEditingComplete: onEditingComplete,
13 + onSubmitted: onSubmitted,
14 + cursorColor: primaryColor,
15 + style: inputFieldTextStyle,
16 + decoration: InputDecoration(
17 + hintText: hintText,
18 + hintStyle: inputFieldHintTextStyle,
19 + focusedBorder: inputFieldFocusedBorderStyle,
20 + contentPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
21 + border: inputFieldDefaultBorderStyle),
22 + ),
23 + );
24 +}
25 +
26 +Container fryoEmailInput(String hintText,
27 + {onTap, onChanged, onEditingComplete, onSubmitted}) {
28 + return Container(
29 + margin: EdgeInsets.only(top: 13),
30 + child: TextField(
31 + onTap: onTap,
32 + onChanged: onChanged,
33 + onEditingComplete: onEditingComplete,
34 + onSubmitted: onSubmitted,
35 + keyboardType: TextInputType.emailAddress,
36 + cursorColor: primaryColor,
37 + style: inputFieldTextStyle,
38 + decoration: InputDecoration(
39 + hintText: hintText,
40 + hintStyle: inputFieldHintTextStyle,
41 + focusedBorder: inputFieldFocusedBorderStyle,
42 + contentPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
43 + border: inputFieldDefaultBorderStyle),
44 + ),
45 + );
46 +}
47 +
48 +
49 +Container fryoPasswordInput(String hintText,
50 + {onTap, onChanged, onEditingComplete, onSubmitted}) {
51 + return Container(
52 + margin: EdgeInsets.only(top: 13),
53 + child: TextField(
54 + onTap: onTap,
55 + onChanged: onChanged,
56 + onEditingComplete: onEditingComplete,
57 + onSubmitted: onSubmitted,
58 + obscureText: true,
59 + cursorColor: primaryColor,
60 + style: inputFieldHintPaswordTextStyle,
61 + decoration: InputDecoration(
62 + hintText: hintText,
63 + hintStyle: inputFieldHintPaswordTextStyle,
64 + focusedBorder: inputFieldFocusedBorderStyle,
65 + contentPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
66 + border: inputFieldDefaultBorderStyle),
67 + ),
68 + );
69 +}
1 +import 'package:flutter/material.dart';
2 +import './colors.dart';
3 +
4 +/////////////////////////////////
5 +/// TEXT STYLES
6 +////////////////////////////////
7 +
8 +const logoStyle = TextStyle(
9 + fontFamily: 'Pacifico',
10 + fontSize: 30,
11 + color: Colors.black54,
12 + letterSpacing: 2);
13 +
14 +const logoWhiteStyle = TextStyle(
15 + fontFamily: 'Pacifico',
16 + fontSize: 21,
17 + letterSpacing: 2,
18 + color: Colors.white);
19 +const whiteText = TextStyle(color: Colors.white, fontFamily: 'Poppins');
20 +const disabledText = TextStyle(color: Colors.grey, fontFamily: 'Poppins');
21 +const contrastText = TextStyle(color: primaryColor, fontFamily: 'Poppins');
22 +const contrastTextBold = TextStyle(
23 + color: primaryColor, fontFamily: 'Poppins', fontWeight: FontWeight.w600);
24 +
25 +const h3 = TextStyle(
26 + color: Colors.black,
27 + fontSize: 24,
28 + fontWeight: FontWeight.w800,
29 + fontFamily: 'Poppins');
30 +
31 +const h4 = TextStyle(
32 + color: Colors.black,
33 + fontSize: 18,
34 + fontWeight: FontWeight.w700,
35 + fontFamily: 'Poppins');
36 +
37 +const h5 = TextStyle(
38 + color: Colors.black,
39 + fontSize: 18,
40 + fontWeight: FontWeight.w500,
41 + fontFamily: 'Poppins');
42 +
43 + const h6 = TextStyle(
44 + color: Colors.black,
45 + fontSize: 16,
46 + fontWeight: FontWeight.w500,
47 + fontFamily: 'Poppins');
48 +
49 +
50 +const priceText = TextStyle(
51 + color: Colors.black,
52 + fontSize: 19,
53 + fontWeight: FontWeight.w800,
54 + fontFamily: 'Poppins');
55 +
56 +const foodNameText = TextStyle(
57 + color: Colors.black,
58 + fontSize: 17,
59 + fontWeight: FontWeight.w600,
60 + fontFamily: 'Poppins');
61 +
62 +const tabLinkStyle =
63 + TextStyle(fontWeight: FontWeight.w500);
64 +
65 +const taglineText = TextStyle(color: Colors.grey, fontFamily: 'Poppins');
66 +const categoryText = TextStyle(
67 + color: Color(0xff444444),
68 + fontWeight: FontWeight.w700,
69 + fontFamily: 'Poppins');
70 +
71 +const inputFieldTextStyle =
72 + TextStyle(fontFamily: 'Poppins', fontWeight: FontWeight.w500);
73 +
74 +const inputFieldHintTextStyle =
75 + TextStyle(fontFamily: 'Poppins', color: Color(0xff444444));
76 +
77 +const inputFieldPasswordTextStyle = TextStyle(
78 + fontFamily: 'Poppins', fontWeight: FontWeight.w500, letterSpacing: 3);
79 +
80 +const inputFieldHintPaswordTextStyle = TextStyle(
81 + fontFamily: 'Poppins', color: Color(0xff444444), letterSpacing: 2);
82 +
83 +///////////////////////////////////
84 +/// BOX DECORATION STYLES
85 +//////////////////////////////////
86 +
87 +const authPlateDecoration = BoxDecoration(
88 + color: white,
89 + boxShadow: [
90 + BoxShadow(
91 + color: Color.fromRGBO(0, 0, 0, .1),
92 + blurRadius: 10,
93 + spreadRadius: 5,
94 + offset: Offset(0, 1))
95 + ],
96 + borderRadius: BorderRadiusDirectional.only(
97 + bottomEnd: Radius.circular(20), bottomStart: Radius.circular(20)));
98 +
99 +/////////////////////////////////////
100 +/// INPUT FIELD DECORATION STYLES
101 +////////////////////////////////////
102 +
103 +const inputFieldFocusedBorderStyle = OutlineInputBorder(
104 + borderRadius: BorderRadius.all(Radius.circular(6)),
105 + borderSide: BorderSide(
106 + color: primaryColor,
107 + ));
108 +
109 +const inputFieldDefaultBorderStyle = OutlineInputBorder(
110 + gapPadding: 0, borderRadius: BorderRadius.all(Radius.circular(6)));
...@@ -81,6 +81,13 @@ packages: ...@@ -81,6 +81,13 @@ packages:
81 url: "https://pub.dartlang.org" 81 url: "https://pub.dartlang.org"
82 source: hosted 82 source: hosted
83 version: "1.3.0-nullsafety.3" 83 version: "1.3.0-nullsafety.3"
84 + page_transition:
85 + dependency: "direct main"
86 + description:
87 + name: page_transition
88 + url: "https://pub.dartlang.org"
89 + source: hosted
90 + version: "1.1.7+6"
84 path: 91 path:
85 dependency: transitive 92 dependency: transitive
86 description: 93 description:
......
...@@ -25,6 +25,7 @@ dependencies: ...@@ -25,6 +25,7 @@ dependencies:
25 sdk: flutter 25 sdk: flutter
26 26
27 flutter_screenutil: ^0.7.0 27 flutter_screenutil: ^0.7.0
28 + page_transition: '^1.1.5'
28 29
29 30
30 dev_dependencies: 31 dev_dependencies:
......