Showing
7 changed files
with
318 additions
and
52 deletions
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 'package:flutter_application_1/src/screens/SettingPage.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'; |
5 | 6 | ||
... | @@ -22,7 +23,6 @@ class _DashBoardState extends State<DashBoard> { | ... | @@ -22,7 +23,6 @@ class _DashBoardState extends State<DashBoard> { |
22 | ineerInformationpage(context), | 23 | ineerInformationpage(context), |
23 | mainpage(context), | 24 | mainpage(context), |
24 | outerInformationpage(context), | 25 | outerInformationpage(context), |
25 | - setting(context), | ||
26 | ]; | 26 | ]; |
27 | 27 | ||
28 | return Scaffold( | 28 | return Scaffold( |
... | @@ -44,7 +44,13 @@ class _DashBoardState extends State<DashBoard> { | ... | @@ -44,7 +44,13 @@ class _DashBoardState extends State<DashBoard> { |
44 | Icons.settings, | 44 | Icons.settings, |
45 | color: Colors.black, | 45 | color: Colors.black, |
46 | ), | 46 | ), |
47 | - onPressed: () {}, | 47 | + onPressed: () { |
48 | + Navigator.push( | ||
49 | + context, | ||
50 | + MaterialPageRoute( | ||
51 | + builder: (BuildContext context) => SettingPage(), | ||
52 | + )); | ||
53 | + }, | ||
48 | ) | 54 | ) |
49 | ], | 55 | ], |
50 | ), | 56 | ), |
... | @@ -661,12 +667,6 @@ Widget outerInformationpage(BuildContext context) { | ... | @@ -661,12 +667,6 @@ Widget outerInformationpage(BuildContext context) { |
661 | ); | 667 | ); |
662 | } | 668 | } |
663 | 669 | ||
664 | -Widget setting(BuildContext context) { | ||
665 | - return Scaffold( | ||
666 | - backgroundColor: Colors.green, | ||
667 | - ); | ||
668 | -} | ||
669 | - | ||
670 | /* | 670 | /* |
671 | bottom navbar로 이동 | 671 | bottom navbar로 이동 |
672 | appbar로는 저거 만들어서 사용 | 672 | appbar로는 저거 만들어서 사용 | ... | ... |
... | @@ -16,12 +16,6 @@ class HomePage extends StatefulWidget { | ... | @@ -16,12 +16,6 @@ class HomePage extends StatefulWidget { |
16 | 16 | ||
17 | /// first page class | 17 | /// first page class |
18 | class _HomePageState extends State<HomePage> { | 18 | class _HomePageState extends State<HomePage> { |
19 | - void increaseScreen() { | ||
20 | - setState(() { | ||
21 | - widget.screenCount++; | ||
22 | - }); | ||
23 | - } | ||
24 | - | ||
25 | @override | 19 | @override |
26 | void initState() { | 20 | void initState() { |
27 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); | 21 | SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); |
... | @@ -101,14 +95,14 @@ class _HomePageState extends State<HomePage> { | ... | @@ -101,14 +95,14 @@ class _HomePageState extends State<HomePage> { |
101 | )); | 95 | )); |
102 | }, | 96 | }, |
103 | child: Text( | 97 | child: Text( |
104 | - '로그인 sdf', | 98 | + '로그인', |
105 | textScaleFactor: 1.0, | 99 | textScaleFactor: 1.0, |
106 | style: TextStyle( | 100 | style: TextStyle( |
107 | - fontSize: 1, | 101 | + color: Colors.white, |
102 | + fontSize: 16, | ||
108 | fontFamily: 'Noto', | 103 | fontFamily: 'Noto', |
109 | fontWeight: FontWeight.bold), | 104 | fontWeight: FontWeight.bold), |
110 | ), | 105 | ), |
111 | - textColor: Colors.black, | ||
112 | color: Color(0xff1674f6), | 106 | color: Color(0xff1674f6), |
113 | shape: RoundedRectangleBorder( | 107 | shape: RoundedRectangleBorder( |
114 | borderRadius: BorderRadius.circular(50)), | 108 | borderRadius: BorderRadius.circular(50)), |
... | @@ -116,30 +110,31 @@ class _HomePageState extends State<HomePage> { | ... | @@ -116,30 +110,31 @@ class _HomePageState extends State<HomePage> { |
116 | ), | 110 | ), |
117 | GestureDetector( | 111 | GestureDetector( |
118 | child: Container( | 112 | child: Container( |
119 | - width: size.width * 0.8, | 113 | + width: size.width * 0.8, |
120 | - padding: EdgeInsets.all(0), | 114 | + padding: EdgeInsets.all(0), |
121 | - child: OutlineButton( | 115 | + child: OutlineButton( |
122 | - padding: EdgeInsets.fromLTRB(0, 25, 0, 15), | 116 | + padding: EdgeInsets.fromLTRB(0, 25, 0, 15), |
123 | - onPressed: () { | 117 | + onPressed: () { |
124 | - Navigator.push( | 118 | + Navigator.push( |
125 | - context, | 119 | + context, |
126 | - MaterialPageRoute( | 120 | + MaterialPageRoute( |
127 | - builder: (BuildContext context) => | 121 | + builder: (BuildContext context) => |
128 | - SignUpLocal(), | 122 | + SignUpLocal(), |
129 | - )); | 123 | + )); |
130 | - }, | 124 | + }, |
131 | - child: Text( | 125 | + child: Text( |
132 | - '회원 가입', | 126 | + '회원 가입', |
133 | - textScaleFactor: 1.0, | 127 | + textScaleFactor: 1.0, |
134 | - style: | 128 | + style: |
135 | - TextStyle(fontSize: 16, fontFamily: 'Noto'), | 129 | + TextStyle(fontSize: 16, fontFamily: 'Noto'), |
136 | - ), | 130 | + ), |
137 | - textColor: Colors.black, | 131 | + textColor: Colors.black, |
138 | - highlightedBorderColor: highlightColor, | 132 | + highlightedBorderColor: highlightColor, |
139 | - borderSide: BorderSide.none, | 133 | + borderSide: BorderSide.none, |
140 | - shape: RoundedRectangleBorder( | 134 | + shape: RoundedRectangleBorder( |
141 | - borderRadius: BorderRadius.circular(50)), | 135 | + borderRadius: BorderRadius.circular(50)), |
142 | - )), | 136 | + ), |
137 | + ), | ||
143 | ), | 138 | ), |
144 | ], | 139 | ], |
145 | ), | 140 | ), | ... | ... |
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 'package:flutter_application_1/src/screens/DashBoard.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:flutter_application_1/src/screens/SettingPage/Alarm.dart'; | ||
7 | +import 'package:flutter_application_1/src/screens/SettingPage/Bluetooth.dart'; | ||
8 | +import 'package:flutter_application_1/src/screens/SettingPage/DEVInformation.dart'; | ||
9 | +import 'package:flutter_application_1/src/screens/SettingPage/InformationModify.dart'; | ||
5 | 10 | ||
6 | class SettingPage extends StatefulWidget { | 11 | class SettingPage extends StatefulWidget { |
7 | @override | 12 | @override |
... | @@ -10,14 +15,229 @@ class SettingPage extends StatefulWidget { | ... | @@ -10,14 +15,229 @@ class SettingPage extends StatefulWidget { |
10 | 15 | ||
11 | class _SettingPageState extends State<SettingPage> { | 16 | class _SettingPageState extends State<SettingPage> { |
12 | Widget build(BuildContext context) { | 17 | Widget build(BuildContext context) { |
18 | + final Size size = MediaQuery.of(context).size; | ||
13 | return MaterialApp( | 19 | return MaterialApp( |
14 | title: 'Welcome to Flutter', | 20 | title: 'Welcome to Flutter', |
15 | home: Scaffold( | 21 | home: Scaffold( |
16 | appBar: AppBar( | 22 | appBar: AppBar( |
17 | - title: Text('Welcome to Flutter'), | 23 | + iconTheme: IconThemeData(color: Colors.black), |
24 | + backgroundColor: Colors.white, | ||
25 | + title: Text( | ||
26 | + 'Smart Medicine Box', | ||
27 | + style: TextStyle( | ||
28 | + color: Colors.black, | ||
29 | + fontSize: 20, | ||
30 | + fontFamily: 'Noto', | ||
31 | + fontWeight: FontWeight.bold), | ||
32 | + ), | ||
33 | + actions: [ | ||
34 | + IconButton( | ||
35 | + icon: Icon( | ||
36 | + Icons.settings, | ||
37 | + color: Colors.black, | ||
38 | + ), | ||
39 | + onPressed: () {}, | ||
40 | + ) | ||
41 | + ], | ||
18 | ), | 42 | ), |
19 | - body: Center( | 43 | + drawer: Drawer( |
20 | - child: Text('Setting page 작업 영역'), | 44 | + child: ListView( |
45 | + children: [ | ||
46 | + DrawerHeader( | ||
47 | + child: Text('Drawer Header'), | ||
48 | + decoration: BoxDecoration( | ||
49 | + color: Colors.blue, | ||
50 | + ), | ||
51 | + ), | ||
52 | + ListTile( | ||
53 | + title: Text('Test 1'), | ||
54 | + onTap: () {}, | ||
55 | + ), | ||
56 | + ListTile( | ||
57 | + title: Text('Test 2'), | ||
58 | + onTap: () {}, | ||
59 | + ), | ||
60 | + ListTile( | ||
61 | + title: Text('Test 3'), | ||
62 | + onTap: () {}, | ||
63 | + ), | ||
64 | + ], | ||
65 | + ), | ||
66 | + ), | ||
67 | + body: Container( | ||
68 | + height: size.height * 0.9, | ||
69 | + margin: EdgeInsets.fromLTRB(0, 30, 0, 0), | ||
70 | + padding: EdgeInsets.fromLTRB(5, 0, 5, 5), | ||
71 | + child: Column( | ||
72 | + children: <Widget>[ | ||
73 | + Container( | ||
74 | + padding: EdgeInsets.fromLTRB(5, 5, 5, 5), | ||
75 | + height: size.height * 0.08, | ||
76 | + width: size.width, | ||
77 | + child: Center( | ||
78 | + child: Text( | ||
79 | + 'Setting', | ||
80 | + textAlign: TextAlign.center, | ||
81 | + textScaleFactor: 1.0, | ||
82 | + style: TextStyle( | ||
83 | + color: Colors.black, | ||
84 | + fontSize: 32, | ||
85 | + fontFamily: 'NotoSansKR', | ||
86 | + fontWeight: FontWeight.w700), | ||
87 | + ), | ||
88 | + ), | ||
89 | + ), | ||
90 | + Container( | ||
91 | + height: size.height * 0.6, | ||
92 | + child: Column( | ||
93 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
94 | + children: <Widget>[ | ||
95 | + Container( | ||
96 | + padding: EdgeInsets.fromLTRB(0, 20, 0, 20), | ||
97 | + width: size.width * 0.8, | ||
98 | + height: size.height * 0.13, | ||
99 | + margin: EdgeInsets.only(bottom: 0), | ||
100 | + child: FlatButton( | ||
101 | + height: size.height * 0.07, | ||
102 | + onPressed: () { | ||
103 | + Navigator.push( | ||
104 | + context, | ||
105 | + MaterialPageRoute( | ||
106 | + builder: (BuildContext context) => Alarm(), | ||
107 | + )); | ||
108 | + }, | ||
109 | + child: Text( | ||
110 | + '알림 설정', | ||
111 | + textScaleFactor: 1.0, | ||
112 | + style: TextStyle( | ||
113 | + color: Colors.white, | ||
114 | + fontSize: 24, | ||
115 | + fontFamily: 'Noto', | ||
116 | + fontWeight: FontWeight.bold), | ||
117 | + ), | ||
118 | + color: Color(0xff8E97FD), | ||
119 | + shape: RoundedRectangleBorder( | ||
120 | + borderRadius: BorderRadius.circular(50)), | ||
121 | + ), | ||
122 | + ), | ||
123 | + Container( | ||
124 | + padding: EdgeInsets.fromLTRB(0, 20, 0, 20), | ||
125 | + width: size.width * 0.8, | ||
126 | + height: size.height * 0.13, | ||
127 | + margin: EdgeInsets.only(bottom: 0), | ||
128 | + child: FlatButton( | ||
129 | + height: size.height * 0.07, | ||
130 | + onPressed: () { | ||
131 | + Navigator.push( | ||
132 | + context, | ||
133 | + MaterialPageRoute( | ||
134 | + builder: (BuildContext context) => Bluetooth(), | ||
135 | + )); | ||
136 | + }, | ||
137 | + child: Text( | ||
138 | + '블루투스 설정', | ||
139 | + textScaleFactor: 1.0, | ||
140 | + style: TextStyle( | ||
141 | + color: Colors.white, | ||
142 | + fontSize: 24, | ||
143 | + fontFamily: 'Noto', | ||
144 | + fontWeight: FontWeight.bold), | ||
145 | + ), | ||
146 | + color: Color(0xff8E97FD), | ||
147 | + shape: RoundedRectangleBorder( | ||
148 | + borderRadius: BorderRadius.circular(50)), | ||
149 | + ), | ||
150 | + ), | ||
151 | + Container( | ||
152 | + padding: EdgeInsets.fromLTRB(0, 20, 0, 20), | ||
153 | + width: size.width * 0.8, | ||
154 | + height: size.height * 0.13, | ||
155 | + margin: EdgeInsets.only(bottom: 0), | ||
156 | + child: FlatButton( | ||
157 | + height: size.height * 0.07, | ||
158 | + onPressed: () { | ||
159 | + Navigator.push( | ||
160 | + context, | ||
161 | + MaterialPageRoute( | ||
162 | + builder: (BuildContext context) => | ||
163 | + InformationModify(), | ||
164 | + )); | ||
165 | + }, | ||
166 | + child: Text( | ||
167 | + '약 정보 수정', | ||
168 | + textScaleFactor: 1.0, | ||
169 | + style: TextStyle( | ||
170 | + color: Colors.white, | ||
171 | + fontSize: 24, | ||
172 | + fontFamily: 'Noto', | ||
173 | + fontWeight: FontWeight.bold), | ||
174 | + ), | ||
175 | + color: Color(0xff8E97FD), | ||
176 | + shape: RoundedRectangleBorder( | ||
177 | + borderRadius: BorderRadius.circular(50)), | ||
178 | + ), | ||
179 | + ), | ||
180 | + Container( | ||
181 | + padding: EdgeInsets.fromLTRB(0, 20, 0, 20), | ||
182 | + width: size.width * 0.8, | ||
183 | + height: size.height * 0.13, | ||
184 | + margin: EdgeInsets.only(bottom: 0), | ||
185 | + child: FlatButton( | ||
186 | + height: size.height * 0.07, | ||
187 | + onPressed: () { | ||
188 | + Navigator.push( | ||
189 | + context, | ||
190 | + MaterialPageRoute( | ||
191 | + builder: (BuildContext context) => | ||
192 | + DEVInformation(), | ||
193 | + )); | ||
194 | + }, | ||
195 | + child: Text( | ||
196 | + '개발자 정보', | ||
197 | + textScaleFactor: 1.0, | ||
198 | + style: TextStyle( | ||
199 | + color: Colors.white, | ||
200 | + fontSize: 24, | ||
201 | + fontFamily: 'Noto', | ||
202 | + fontWeight: FontWeight.bold), | ||
203 | + ), | ||
204 | + color: Color(0xff8E97FD), | ||
205 | + shape: RoundedRectangleBorder( | ||
206 | + borderRadius: BorderRadius.circular(50)), | ||
207 | + ), | ||
208 | + ), | ||
209 | + ], | ||
210 | + ), | ||
211 | + ), | ||
212 | + ], | ||
213 | + ), | ||
214 | + ), | ||
215 | + bottomNavigationBar: BottomNavigationBar( | ||
216 | + type: BottomNavigationBarType.fixed, | ||
217 | + backgroundColor: Colors.grey, | ||
218 | + selectedItemColor: Colors.white.withOpacity(.60), | ||
219 | + unselectedItemColor: Colors.white.withOpacity(.60), | ||
220 | + selectedFontSize: 14, | ||
221 | + unselectedFontSize: 14, | ||
222 | + currentIndex: 0, | ||
223 | + onTap: (int index) => { | ||
224 | + setState(() { | ||
225 | + Navigator.push( | ||
226 | + context, | ||
227 | + MaterialPageRoute( | ||
228 | + builder: (BuildContext context) => | ||
229 | + DashBoard(pageNumber: index), | ||
230 | + )); | ||
231 | + }) | ||
232 | + }, | ||
233 | + items: [ | ||
234 | + BottomNavigationBarItem(icon: Icon(Icons.favorite), label: 'In'), | ||
235 | + BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'), | ||
236 | + BottomNavigationBarItem( | ||
237 | + label: 'Out', | ||
238 | + icon: Icon(Icons.favorite), | ||
239 | + ) | ||
240 | + ], | ||
21 | ), | 241 | ), |
22 | ), | 242 | ), |
23 | ); | 243 | ); | ... | ... |
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/colors.dart'; | 3 | +import '../../shared/colors.dart'; |
4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
5 | 5 | ||
6 | -class OuterInformation extends StatefulWidget { | 6 | +class Alarm extends StatefulWidget { |
7 | @override | 7 | @override |
8 | - _OuterInformationState createState() => _OuterInformationState(); | 8 | + _AlarmnState createState() => _AlarmnState(); |
9 | } | 9 | } |
10 | 10 | ||
11 | -class _OuterInformationState extends State<OuterInformation> { | 11 | +class _AlarmnState extends State<Alarm> { |
12 | Widget build(BuildContext context) { | 12 | Widget build(BuildContext context) { |
13 | + final Size size = MediaQuery.of(context).size; | ||
13 | return MaterialApp( | 14 | return MaterialApp( |
14 | title: 'Welcome to Flutter', | 15 | title: 'Welcome to Flutter', |
15 | home: Scaffold( | 16 | home: Scaffold( | ... | ... |
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/colors.dart'; | 3 | +import '../../shared/colors.dart'; |
4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
5 | 5 | ||
6 | -class InnerInformation extends StatefulWidget { | 6 | +class Bluetooth extends StatefulWidget { |
7 | @override | 7 | @override |
8 | - _InnerInformationState createState() => _InnerInformationState(); | 8 | + _BluetoothState createState() => _BluetoothState(); |
9 | } | 9 | } |
10 | 10 | ||
11 | -class _InnerInformationState extends State<InnerInformation> { | 11 | +class _BluetoothState extends State<Bluetooth> { |
12 | Widget build(BuildContext context) { | 12 | Widget build(BuildContext context) { |
13 | return MaterialApp( | 13 | return MaterialApp( |
14 | title: 'Welcome to Flutter', | 14 | title: 'Welcome to Flutter', | ... | ... |
1 | +import 'package:flutter/material.dart'; | ||
2 | +import 'package:flutter/services.dart'; | ||
3 | +import '../../shared/colors.dart'; | ||
4 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
5 | + | ||
6 | +class DEVInformation extends StatefulWidget { | ||
7 | + @override | ||
8 | + _DEVInformationState createState() => _DEVInformationState(); | ||
9 | +} | ||
10 | + | ||
11 | +class _DEVInformationState extends State<DEVInformation> { | ||
12 | + Widget build(BuildContext context) { | ||
13 | + return MaterialApp( | ||
14 | + title: 'Welcome to Flutter', | ||
15 | + home: Scaffold( | ||
16 | + appBar: AppBar( | ||
17 | + title: Text('Welcome to Flutter'), | ||
18 | + ), | ||
19 | + body: Center( | ||
20 | + child: Text('개발자 정보 작업 구역'), | ||
21 | + ), | ||
22 | + ), | ||
23 | + ); | ||
24 | + } | ||
25 | +} |
1 | +import 'package:flutter/material.dart'; | ||
2 | +import 'package:flutter/services.dart'; | ||
3 | +import '../../shared/colors.dart'; | ||
4 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
5 | + | ||
6 | +class InformationModify extends StatefulWidget { | ||
7 | + @override | ||
8 | + _InformationModifyState createState() => _InformationModifyState(); | ||
9 | +} | ||
10 | + | ||
11 | +class _InformationModifyState extends State<InformationModify> { | ||
12 | + Widget build(BuildContext context) { | ||
13 | + return MaterialApp( | ||
14 | + title: 'Welcome to Flutter', | ||
15 | + home: Scaffold( | ||
16 | + appBar: AppBar( | ||
17 | + title: Text('Welcome to Flutter'), | ||
18 | + ), | ||
19 | + body: Center( | ||
20 | + child: Text('약병 정보 변경 작업 구역'), | ||
21 | + ), | ||
22 | + ), | ||
23 | + ); | ||
24 | + } | ||
25 | +} |
-
Please register or login to post a comment