Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
고원빈
2021-04-30 19:07:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f226cf0622bd524b46e4774cc0d0750694250fcd
f226cf06
1 parent
55863dde
[frontend] Sign Up page 구현 완료
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
240 additions
and
91 deletions
frontend/flutter_application_1/lib/src/screens/Homepage.dart
frontend/flutter_application_1/lib/src/screens/SignUpLocal.dart
frontend/flutter_application_1/lib/src/screens/SignUpPage.dart
frontend/flutter_application_1/pubspec.lock
frontend/flutter_application_1/pubspec.yaml
frontend/flutter_application_1/lib/src/screens/Homepage.dart
View file @
f226cf0
...
...
@@ -3,7 +3,7 @@ import 'package:flutter/services.dart';
import
'../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'./SignInPage.dart'
;
import
'./SignUp
Page
.dart'
;
import
'./SignUp
Local
.dart'
;
class
HomePage
extends
StatefulWidget
{
final
String
pageTitle
;
...
...
@@ -125,7 +125,7 @@ class _HomePageState extends State<HomePage> {
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SignUp
Page
(),
SignUp
Local
(),
));
},
child:
Text
(
...
...
frontend/flutter_application_1/lib/src/screens/SignUpLocal.dart
0 → 100644
View file @
f226cf0
import
'dart:convert'
;
import
'package:flutter/material.dart'
;
class
SignUpLocal
extends
StatefulWidget
{
@override
_SignUpLocalState
createState
()
=>
_SignUpLocalState
();
}
class
_SignUpLocalState
extends
State
<
SignUpLocal
>
{
final
emailController
=
TextEditingController
();
final
passwordController
=
TextEditingController
();
final
passwordValidController
=
TextEditingController
();
final
medicineNameController
=
TextEditingController
();
final
medicineFactureController
=
TextEditingController
();
bool
_validate
=
false
;
int
userRole
=
0
;
// Initially password is obscure
bool
passwordVisible
=
false
;
bool
passwordValidationVisible
=
true
;
@override
Widget
build
(
BuildContext
context
)
{
final
Size
size
=
MediaQuery
.
of
(
context
).
size
;
// int goals = 60;
// int points = 75;
return
Scaffold
(
backgroundColor:
Colors
.
white
,
body:
ListView
(
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
25
,
20
,
0
),
child:
Row
(
children:
<
Widget
>[
Text
(
'회원 가입'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
fontSize:
34
),
)
],
),
),
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
10
,
20
,
0
),
child:
Row
(
children:
<
Widget
>[
Text
(
'SmartMedicine 회원가입'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
fontSize:
16
),
)
],
),
),
MediaQuery
(
data:
MediaQuery
.
of
(
context
).
copyWith
(
textScaleFactor:
1.0
),
child:
Container
(
height:
size
.
height
*
0.8
,
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
5
,
20
,
20
),
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
TextFormField
(
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
labelText:
'이메일'
,
helperText:
'아아디로 사용할 이메일 주소를 입력해주세요.'
,
),
),
TextFormField
(
keyboardType:
TextInputType
.
text
,
controller:
passwordController
,
obscureText:
!
passwordVisible
,
//This will obscure text dynamically
decoration:
InputDecoration
(
labelText:
'비밀번호'
,
helperText:
'비밀번호를 입력해주세요'
,
// Here is key idea
suffixIcon:
IconButton
(
icon:
Icon
(
// Based on passwordVisible state choose the icon
passwordVisible
?
Icons
.
visibility
:
Icons
.
visibility_off
,
color:
Theme
.
of
(
context
).
primaryColorDark
,
),
onPressed:
()
{
// Update the state i.e. toogle the state of passwordVisible variable
setState
(()
{
passwordVisible
=
!
passwordVisible
;
});
},
),
),
),
TextFormField
(
onChanged:
(
text
)
{
if
(
passwordController
.
text
==
text
)
{
setState
(()
{
_validate
=
false
;
});
}
else
{
setState
(()
{
_validate
=
true
;
});
}
},
keyboardType:
TextInputType
.
text
,
controller:
passwordValidController
,
obscureText:
!
passwordValidationVisible
,
//This will obscure text dynamically
decoration:
InputDecoration
(
labelText:
'비밀번호 확인'
,
helperText:
'비밀번호를 확인해주세요'
,
errorText:
_validate
?
'두 비밀번호가 다릅니다. 다시 확인해주세요.'
:
null
,
// Here is key idea
suffixIcon:
IconButton
(
icon:
Icon
(
// Based on passwordVisible state choose the icon
passwordValidationVisible
?
Icons
.
visibility
:
Icons
.
visibility_off
,
color:
Theme
.
of
(
context
).
primaryColorDark
,
),
onPressed:
()
{
// Update the state i.e. toogle the state of passwordVisible variable
setState
(()
{
passwordValidationVisible
=
!
passwordValidationVisible
;
});
},
),
),
),
TextFormField
(
keyboardType:
TextInputType
.
text
,
controller:
medicineNameController
,
decoration:
InputDecoration
(
labelText:
'약 이름'
,
helperText:
'약의 이름을 읿력하세요'
,
),
),
TextFormField
(
keyboardType:
TextInputType
.
text
,
controller:
medicineFactureController
,
decoration:
InputDecoration
(
labelText:
'약 제조사 이름'
,
helperText:
'약 제조사의 이름을 읿력하세요'
,
),
),
],
),
),
),
),
Container
(
height:
80
,
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
20
,
20
,
20
),
child:
RaisedButton
(
onPressed:
()
async
{},
shape:
RoundedRectangleBorder
(
borderRadius:
new
BorderRadius
.
circular
(
18.0
),
side:
BorderSide
(
color:
Colors
.
blue
)),
color:
Color
(
0xff1674f6
),
child:
Text
(
'회원 가입'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
fontSize:
16
,
color:
Colors
.
white
,
fontWeight:
FontWeight
.
bold
),
),
),
)
],
),
bottomNavigationBar:
BottomAppBar
(
elevation:
0
,
child:
Container
(
height:
70
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
70
,
0
,
70
,
0
),
child:
Text
(
'회원 가입시, 이용 야관 및 개인정보 처리 방침에 동의하는 것으로 간주합니다..'
,
style:
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff747474
)),
textAlign:
TextAlign
.
center
,
),
)
],
),
),
),
);
}
}
frontend/flutter_application_1/lib/src/screens/SignUpPage.dart
deleted
100644 → 0
View file @
55863dd
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'../shared/styles.dart'
;
import
'../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:page_transition/page_transition.dart'
;
import
'../shared/inputFields.dart'
;
import
'./SignInPage.dart'
;
import
'./DashBoard.dart'
;
class
SignUpPage
extends
StatefulWidget
{
final
String
pageTitle
;
SignUpPage
({
Key
key
,
this
.
pageTitle
})
:
super
(
key:
key
);
@override
_SignUpPageState
createState
()
=>
_SignUpPageState
();
}
class
_SignUpPageState
extends
State
<
SignUpPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
elevation:
0
,
backgroundColor:
white
,
title:
Text
(
'Sign Up'
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontFamily:
'Poppins'
,
fontSize:
15
)),
actions:
<
Widget
>[
FlatButton
(
onPressed:
()
{
// Navigator.of(context).pushNamed('/signin');
Navigator
.
push
(
context
,
PageTransition
(
type:
PageTransitionType
.
rightToLeft
,
child:
SignInPage
()));
},
child:
Text
(
'Sign In'
,
style:
contrastText
),
)
],
),
body:
ListView
(
shrinkWrap:
true
,
children:
<
Widget
>[
Container
(
padding:
EdgeInsets
.
only
(
left:
18
,
right:
18
),
child:
Stack
(
children:
<
Widget
>[
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
'Welcome to Fryo!'
,
style:
h3
),
Text
(
'Let
\'
s get started'
,
style:
taglineText
),
fryoTextInput
(
'Username'
),
fryoTextInput
(
'Full Name'
),
fryoEmailInput
(
'Email Address'
),
fryoPasswordInput
(
'Password'
)
],
),
Positioned
(
bottom:
15
,
right:
-
15
,
child:
FlatButton
(
onPressed:
()
{
Navigator
.
push
(
context
,
PageTransition
(
type:
PageTransitionType
.
rightToLeft
,
child:
DashBoard
()));
},
color:
primaryColor
,
padding:
EdgeInsets
.
all
(
13
),
shape:
CircleBorder
(),
child:
Icon
(
Icons
.
arrow_forward
,
color:
white
),
),
)
],
),
height:
360
,
width:
double
.
infinity
,
decoration:
authPlateDecoration
,
),
],
));
}
}
frontend/flutter_application_1/pubspec.lock
View file @
f226cf0
...
...
@@ -67,6 +67,27 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.4"
mailer:
dependency: "direct main"
description:
name: mailer
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.0"
matcher:
dependency: transitive
description:
...
...
@@ -81,6 +102,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7"
page_transition:
dependency: "direct main"
description:
...
...
@@ -95,6 +123,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.2"
sky_engine:
dependency: transitive
description: flutter
...
...
frontend/flutter_application_1/pubspec.yaml
View file @
f226cf0
...
...
@@ -26,6 +26,7 @@ dependencies:
flutter_screenutil
:
^0.7.0
page_transition
:
'
^1.1.5'
mailer
:
'
^3.0.4'
dev_dependencies
:
...
...
Please
register
or
login
to post a comment