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-05-12 01:08:18 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
03d5a9ed34c2678a6aa59d29b811170f40c3ba4e
03d5a9ed
1 parent
ebbff5a8
[frontend] setting page 구현
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
295 additions
and
29 deletions
frontend/flutter_application_1/lib/src/screens/DashBoard.dart
frontend/flutter_application_1/lib/src/screens/Homepage.dart
frontend/flutter_application_1/lib/src/screens/SettingPage.dart
frontend/flutter_application_1/lib/src/screens/OuterInformation.dart → frontend/flutter_application_1/lib/src/screens/SettingPage/Alarm.dart
frontend/flutter_application_1/lib/src/screens/InnerInformation copy.dart → frontend/flutter_application_1/lib/src/screens/SettingPage/Bluetooth.dart
frontend/flutter_application_1/lib/src/screens/SettingPage/DEVInformation.dart
frontend/flutter_application_1/lib/src/screens/SettingPage/InformationModify.dart
frontend/flutter_application_1/lib/src/screens/DashBoard.dart
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_application_1/src/screens/SettingPage.dart'
;
import
'../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
...
...
@@ -22,7 +23,6 @@ class _DashBoardState extends State<DashBoard> {
ineerInformationpage
(
context
),
mainpage
(
context
),
outerInformationpage
(
context
),
setting
(
context
),
];
return
Scaffold
(
...
...
@@ -44,7 +44,13 @@ class _DashBoardState extends State<DashBoard> {
Icons
.
settings
,
color:
Colors
.
black
,
),
onPressed:
()
{},
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
SettingPage
(),
));
},
)
],
),
...
...
@@ -661,12 +667,6 @@ Widget outerInformationpage(BuildContext context) {
);
}
Widget
setting
(
BuildContext
context
)
{
return
Scaffold
(
backgroundColor:
Colors
.
green
,
);
}
/*
bottom navbar로 이동
appbar로는 저거 만들어서 사용
...
...
frontend/flutter_application_1/lib/src/screens/Homepage.dart
View file @
03d5a9e
...
...
@@ -16,12 +16,6 @@ class HomePage extends StatefulWidget {
/// first page class
class
_HomePageState
extends
State
<
HomePage
>
{
void
increaseScreen
()
{
setState
(()
{
widget
.
screenCount
++;
});
}
@override
void
initState
()
{
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
]);
...
...
@@ -101,14 +95,14 @@ class _HomePageState extends State<HomePage> {
));
},
child:
Text
(
'로그인
sdf
'
,
'로그인'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
fontSize:
1
,
color:
Colors
.
white
,
fontSize:
16
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
textColor:
Colors
.
black
,
color:
Color
(
0xff1674f6
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
50
)),
...
...
@@ -139,7 +133,8 @@ class _HomePageState extends State<HomePage> {
borderSide:
BorderSide
.
none
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
50
)),
)),
),
),
),
],
),
...
...
frontend/flutter_application_1/lib/src/screens/SettingPage.dart
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_application_1/src/screens/DashBoard.dart'
;
import
'../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_application_1/src/screens/SettingPage/Alarm.dart'
;
import
'package:flutter_application_1/src/screens/SettingPage/Bluetooth.dart'
;
import
'package:flutter_application_1/src/screens/SettingPage/DEVInformation.dart'
;
import
'package:flutter_application_1/src/screens/SettingPage/InformationModify.dart'
;
class
SettingPage
extends
StatefulWidget
{
@override
...
...
@@ -10,14 +15,229 @@ class SettingPage extends StatefulWidget {
class
_SettingPageState
extends
State
<
SettingPage
>
{
Widget
build
(
BuildContext
context
)
{
final
Size
size
=
MediaQuery
.
of
(
context
).
size
;
return
MaterialApp
(
title:
'Welcome to Flutter'
,
home:
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'Welcome to Flutter'
),
iconTheme:
IconThemeData
(
color:
Colors
.
black
),
backgroundColor:
Colors
.
white
,
title:
Text
(
'Smart Medicine Box'
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
20
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
body:
Center
(
child:
Text
(
'Setting page 작업 영역'
),
actions:
[
IconButton
(
icon:
Icon
(
Icons
.
settings
,
color:
Colors
.
black
,
),
onPressed:
()
{},
)
],
),
drawer:
Drawer
(
child:
ListView
(
children:
[
DrawerHeader
(
child:
Text
(
'Drawer Header'
),
decoration:
BoxDecoration
(
color:
Colors
.
blue
,
),
),
ListTile
(
title:
Text
(
'Test 1'
),
onTap:
()
{},
),
ListTile
(
title:
Text
(
'Test 2'
),
onTap:
()
{},
),
ListTile
(
title:
Text
(
'Test 3'
),
onTap:
()
{},
),
],
),
),
body:
Container
(
height:
size
.
height
*
0.9
,
margin:
EdgeInsets
.
fromLTRB
(
0
,
30
,
0
,
0
),
padding:
EdgeInsets
.
fromLTRB
(
5
,
0
,
5
,
5
),
child:
Column
(
children:
<
Widget
>[
Container
(
padding:
EdgeInsets
.
fromLTRB
(
5
,
5
,
5
,
5
),
height:
size
.
height
*
0.08
,
width:
size
.
width
,
child:
Center
(
child:
Text
(
'Setting'
,
textAlign:
TextAlign
.
center
,
textScaleFactor:
1.0
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
32
,
fontFamily:
'NotoSansKR'
,
fontWeight:
FontWeight
.
w700
),
),
),
),
Container
(
height:
size
.
height
*
0.6
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
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
)
=>
Alarm
(),
));
},
child:
Text
(
'알림 설정'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
color:
Color
(
0xff8E97FD
),
shape:
RoundedRectangleBorder
(
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
)
=>
Bluetooth
(),
));
},
child:
Text
(
'블루투스 설정'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
color:
Color
(
0xff8E97FD
),
shape:
RoundedRectangleBorder
(
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
)
=>
InformationModify
(),
));
},
child:
Text
(
'약 정보 수정'
,
textScaleFactor:
1.0
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
,
fontFamily:
'Noto'
,
fontWeight:
FontWeight
.
bold
),
),
color:
Color
(
0xff8E97FD
),
shape:
RoundedRectangleBorder
(
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
(
0xff8E97FD
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
50
)),
),
),
],
),
),
],
),
),
bottomNavigationBar:
BottomNavigationBar
(
type:
BottomNavigationBarType
.
fixed
,
backgroundColor:
Colors
.
grey
,
selectedItemColor:
Colors
.
white
.
withOpacity
(.
60
),
unselectedItemColor:
Colors
.
white
.
withOpacity
(.
60
),
selectedFontSize:
14
,
unselectedFontSize:
14
,
currentIndex:
0
,
onTap:
(
int
index
)
=>
{
setState
(()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
BuildContext
context
)
=>
DashBoard
(
pageNumber:
index
),
));
})
},
items:
[
BottomNavigationBarItem
(
icon:
Icon
(
Icons
.
favorite
),
label:
'In'
),
BottomNavigationBarItem
(
icon:
Icon
(
Icons
.
home
),
label:
'Home'
),
BottomNavigationBarItem
(
label:
'Out'
,
icon:
Icon
(
Icons
.
favorite
),
)
],
),
),
);
...
...
frontend/flutter_application_1/lib/src/screens/
OuterInformation
.dart
→
frontend/flutter_application_1/lib/src/screens/
SettingPage/Alarm
.dart
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'../shared/colors.dart'
;
import
'../
../
shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
class
OuterInformation
extends
StatefulWidget
{
class
Alarm
extends
StatefulWidget
{
@override
_
OuterInformationState
createState
()
=>
_OuterInformatio
nState
();
_
AlarmnState
createState
()
=>
_Alarm
nState
();
}
class
_
OuterInformationState
extends
State
<
OuterInformation
>
{
class
_
AlarmnState
extends
State
<
Alarm
>
{
Widget
build
(
BuildContext
context
)
{
final
Size
size
=
MediaQuery
.
of
(
context
).
size
;
return
MaterialApp
(
title:
'Welcome to Flutter'
,
home:
Scaffold
(
...
...
frontend/flutter_application_1/lib/src/screens/
InnerInformation copy
.dart
→
frontend/flutter_application_1/lib/src/screens/
SettingPage/Bluetooth
.dart
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'../shared/colors.dart'
;
import
'../
../
shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
class
InnerInformation
extends
StatefulWidget
{
class
Bluetooth
extends
StatefulWidget
{
@override
_
InnerInformationState
createState
()
=>
_InnerInformation
State
();
_
BluetoothState
createState
()
=>
_Bluetooth
State
();
}
class
_
InnerInformationState
extends
State
<
InnerInformation
>
{
class
_
BluetoothState
extends
State
<
Bluetooth
>
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
title:
'Welcome to Flutter'
,
...
...
frontend/flutter_application_1/lib/src/screens/SettingPage/DEVInformation.dart
0 → 100644
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'../../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
class
DEVInformation
extends
StatefulWidget
{
@override
_DEVInformationState
createState
()
=>
_DEVInformationState
();
}
class
_DEVInformationState
extends
State
<
DEVInformation
>
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
title:
'Welcome to Flutter'
,
home:
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'Welcome to Flutter'
),
),
body:
Center
(
child:
Text
(
'개발자 정보 작업 구역'
),
),
),
);
}
}
frontend/flutter_application_1/lib/src/screens/SettingPage/InformationModify.dart
0 → 100644
View file @
03d5a9e
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'../../shared/colors.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
class
InformationModify
extends
StatefulWidget
{
@override
_InformationModifyState
createState
()
=>
_InformationModifyState
();
}
class
_InformationModifyState
extends
State
<
InformationModify
>
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
title:
'Welcome to Flutter'
,
home:
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'Welcome to Flutter'
),
),
body:
Center
(
child:
Text
(
'약병 정보 변경 작업 구역'
),
),
),
);
}
}
Please
register
or
login
to post a comment