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-06-07 00:35:47 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6a547ff0c324f4680d06ef4d7a141b0ca0a338e6
6a547ff0
1 parent
b27a9433
[frontend] 오타 수정
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
65 deletions
frontend/flutter_application_1/lib/main.dart
frontend/flutter_application_1/lib/src/screens/Homepage.dart
frontend/flutter_application_1/lib/src/screens/Register/SignInPage.dart
frontend/flutter_application_1/lib/src/screens/Register/SignUpLocal.dart
frontend/flutter_application_1/lib/src/screens/SettingPage.dart
frontend/flutter_application_1/lib/src/screens/SettingPage/BottleModifyList.dart
frontend/flutter_application_1/lib/main.dart
View file @
6a547ff
...
...
@@ -5,7 +5,6 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
Future
main
(
)
async
{
await
DotEnv
().
load
(
'.env'
);
runApp
(
MyApp
());
}
...
...
@@ -14,7 +13,7 @@ class MyApp extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
title:
'
Flutter Demo
'
,
title:
'
SMART MEDICINE BOX
'
,
theme:
ThemeData
(
primarySwatch:
Colors
.
blue
,
),
...
...
frontend/flutter_application_1/lib/src/screens/Homepage.dart
View file @
6a547ff
...
...
@@ -6,9 +6,7 @@ import './Register/SignInPage.dart';
import
'Register/SignUpLocal.dart'
;
class
HomePage
extends
StatefulWidget
{
final
String
pageTitle
;
int
screenCount
=
0
;
HomePage
({
Key
key
,
this
.
pageTitle
})
:
super
(
key:
key
);
HomePage
({
Key
key
})
:
super
(
key:
key
);
@override
_HomePageState
createState
()
=>
_HomePageState
();
...
...
@@ -18,8 +16,6 @@ class HomePage extends StatefulWidget {
class
_HomePageState
extends
State
<
HomePage
>
{
@override
void
initState
()
{
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
]);
super
.
initState
();
}
...
...
@@ -27,9 +23,6 @@ class _HomePageState extends State<HomePage> {
Widget
build
(
BuildContext
context
)
{
final
Size
size
=
MediaQuery
.
of
(
context
).
size
;
ScreenUtil
.
instance
=
ScreenUtil
(
width:
size
.
width
,
height:
size
.
height
)
..
init
(
context
);
return
Scaffold
(
body:
GestureDetector
(
child:
Container
(
...
...
@@ -88,11 +81,12 @@ class _HomePageState extends State<HomePage> {
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
5
),
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SignInPage
(),
));
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SignInPage
(),
),
);
},
child:
Text
(
'로그인'
,
...
...
@@ -117,11 +111,12 @@ class _HomePageState extends State<HomePage> {
padding:
EdgeInsets
.
fromLTRB
(
0
,
25
,
0
,
15
),
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SignUpLocal
(),
));
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SignUpLocal
(),
),
);
},
child:
Text
(
'회원 가입'
,
...
...
frontend/flutter_application_1/lib/src/screens/Register/SignInPage.dart
View file @
6a547ff
...
...
@@ -42,6 +42,7 @@ class _SignInPageState extends State<SignInPage> {
Map
<
String
,
dynamic
>
data
=
jsonDecode
(
response
.
body
);
user
=
User
.
fromJson
(
data
);
UserSecureStorage
.
setUserToken
(
user
.
token
);
UserSecureStorage
.
setUserId
(
user
.
userId
);
return
"로그인 성공"
;
}
else
if
(
response
.
statusCode
==
400
)
{
return
"올바르지 않은 아이디 및 패스워드"
;
...
...
@@ -228,8 +229,6 @@ class _SignInPageState extends State<SignInPage> {
});
}
else
{
if
(
saveMessage
==
"로그인 성공"
)
{
UserSecureStorage
.
setUserToken
(
user
.
token
);
var
result
=
await
getHubList
();
if
(
result
==
"Not Found"
)
{
Navigator
.
push
(
...
...
@@ -240,15 +239,13 @@ class _SignInPageState extends State<SignInPage> {
RegisterHub
(
modify_hub:
0
),
));
}
else
if
(
result
==
"get완료"
)
{
UserSecureStorage
.
setUserId
(
user
.
userId
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
HubList
(
hublist:
_hublist
),
)
);
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
HubList
(
hublist:
_hublist
),
),
);
}
else
{}
}
else
{
print
(
'Error'
);
...
...
frontend/flutter_application_1/lib/src/screens/Register/SignUpLocal.dart
View file @
6a547ff
...
...
@@ -20,7 +20,7 @@ class _SignUpLocalState extends State<SignUpLocal> {
// Initially password is obscure
bool
passwordVisible
=
false
;
bool
passwordValidationVisible
=
tru
e
;
bool
passwordValidationVisible
=
fals
e
;
Future
<
String
>
signup_Validate
()
async
{
http
.
Response
response
=
await
http
.
post
(
...
...
frontend/flutter_application_1/lib/src/screens/SettingPage.dart
View file @
6a547ff
...
...
@@ -175,35 +175,6 @@ class _SettingPageState extends State<SettingPage> {
borderRadius:
BorderRadius
.
circular
(
50
)),
),
),
Container
(
padding:
EdgeInsets
.
fromLTRB
(
0
,
20
,
0
,
20
),
width:
size
.
width
*
0.8
,
height:
size
.
height
*
0.13
,
margin:
EdgeInsets
.
only
(
bottom:
0
),
child:
FlatButton
(
height:
size
.
height
*
0.07
,
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
DEVInformation
(),
));
},
child:
Text
(
'개발자 정보'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
color:
Color
(
0xff0B1E33
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
50
)),
),
),
],
),
),
...
...
@@ -219,14 +190,17 @@ class _SettingPageState extends State<SettingPage> {
unselectedFontSize:
14
,
currentIndex:
0
,
onTap:
(
int
index
)
=>
{
setState
(()
{
Navigator
.
push
(
setState
(
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
DashBoard
(
pageNumber:
index
),
));
})
),
);
},
)
},
items:
[
BottomNavigationBarItem
(
...
...
frontend/flutter_application_1/lib/src/screens/SettingPage/BottleModifyList.dart
View file @
6a547ff
...
...
@@ -211,7 +211,7 @@ class _BottleModifyListState extends State<BottleModifyList> {
context:
context
,
builder:
(
BuildContext
context
)
{
return
AlertDialog
(
title:
new
Text
(
'
허브
삭제'
),
title:
new
Text
(
'
약병
삭제'
),
content:
new
Text
(
_bottleList
[
index
].
bottleId
.
toString
()
+
'을 삭제 하시겠습니까?'
),
...
...
Please
register
or
login
to post a comment