고원빈

[frontend] setting page 구현

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로는 저거 만들어서 사용
......
......@@ -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)),
......@@ -116,30 +110,31 @@ class _HomePageState extends State<HomePage> {
),
GestureDetector(
child: Container(
width: size.width * 0.8,
padding: EdgeInsets.all(0),
child: OutlineButton(
padding: EdgeInsets.fromLTRB(0, 25, 0, 15),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
SignUpLocal(),
));
},
child: Text(
'회원 가입',
textScaleFactor: 1.0,
style:
TextStyle(fontSize: 16, fontFamily: 'Noto'),
),
textColor: Colors.black,
highlightedBorderColor: highlightColor,
borderSide: BorderSide.none,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50)),
)),
width: size.width * 0.8,
padding: EdgeInsets.all(0),
child: OutlineButton(
padding: EdgeInsets.fromLTRB(0, 25, 0, 15),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
SignUpLocal(),
));
},
child: Text(
'회원 가입',
textScaleFactor: 1.0,
style:
TextStyle(fontSize: 16, fontFamily: 'Noto'),
),
textColor: Colors.black,
highlightedBorderColor: highlightColor,
borderSide: BorderSide.none,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50)),
),
),
),
],
),
......
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),
),
actions: [
IconButton(
icon: Icon(
Icons.settings,
color: Colors.black,
),
onPressed: () {},
)
],
),
body: Center(
child: Text('Setting page 작업 영역'),
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),
)
],
),
),
);
......
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() => _OuterInformationState();
_AlarmnState createState() => _AlarmnState();
}
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(
......
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() => _InnerInformationState();
_BluetoothState createState() => _BluetoothState();
}
class _InnerInformationState extends State<InnerInformation> {
class _BluetoothState extends State<Bluetooth> {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
......
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('개발자 정보 작업 구역'),
),
),
);
}
}
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('약병 정보 변경 작업 구역'),
),
),
);
}
}