고원빈

[frontend] 오타 수정

......@@ -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,
),
......
......@@ -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(
'회원 가입',
......
......@@ -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');
......
......@@ -20,7 +20,7 @@ class _SignUpLocalState extends State<SignUpLocal> {
// Initially password is obscure
bool passwordVisible = false;
bool passwordValidationVisible = true;
bool passwordValidationVisible = false;
Future<String> signup_Validate() async {
http.Response response = await http.post(
......
......@@ -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(
......
......@@ -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() +
'을 삭제 하시겠습니까?'),
......