|
|
|
|
|
|
|
|
import 'package:farm_tpf/authentication/authentication.dart'; |
|
|
import 'package:farm_tpf/authentication/authentication.dart'; |
|
|
|
|
|
import 'package:farm_tpf/presentation/screens/notification/sc_notification.dart'; |
|
|
|
|
|
import 'package:farm_tpf/presentation/screens/profile/sc_update_profile.dart'; |
|
|
import 'package:farm_tpf/utils/const_color.dart'; |
|
|
import 'package:farm_tpf/utils/const_color.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
|
|
import 'package:flutter_bloc/flutter_bloc.dart'; |
|
|
|
|
|
|
|
|
icon: Icon(Icons.home), |
|
|
icon: Icon(Icons.home), |
|
|
), |
|
|
), |
|
|
DrawerList( |
|
|
DrawerList( |
|
|
index: DrawerIndex.Setting, |
|
|
|
|
|
labelName: 'Cài đặt', |
|
|
|
|
|
icon: Icon(Icons.settings), |
|
|
|
|
|
|
|
|
index: DrawerIndex.ControlDevice, |
|
|
|
|
|
labelName: 'Điều khiển thiết bị', |
|
|
|
|
|
icon: Icon(Icons.device_hub), |
|
|
) |
|
|
) |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
height: 1, |
|
|
height: 1, |
|
|
color: COLOR_CONST.GRAY1, |
|
|
color: COLOR_CONST.GRAY1, |
|
|
), |
|
|
), |
|
|
Container( |
|
|
|
|
|
child: Text("ss"), |
|
|
|
|
|
width: 40, |
|
|
|
|
|
|
|
|
Column( |
|
|
|
|
|
children: <Widget>[ |
|
|
|
|
|
ListTile( |
|
|
|
|
|
title: Text( |
|
|
|
|
|
'Thông báo', |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontWeight: FontWeight.w600, |
|
|
|
|
|
fontSize: 16, |
|
|
|
|
|
), |
|
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
|
), |
|
|
|
|
|
leading: Icon( |
|
|
|
|
|
Icons.notifications, |
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
), |
|
|
|
|
|
onTap: () { |
|
|
|
|
|
Navigator.of(context).push( |
|
|
|
|
|
MaterialPageRoute(builder: (_) => NotificationScreen())); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox( |
|
|
|
|
|
height: 2.0, |
|
|
|
|
|
), |
|
|
|
|
|
ListTile( |
|
|
|
|
|
title: Text( |
|
|
|
|
|
'Cài đặt', |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontWeight: FontWeight.w600, |
|
|
|
|
|
fontSize: 16, |
|
|
|
|
|
), |
|
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
|
), |
|
|
|
|
|
leading: Icon( |
|
|
|
|
|
Icons.settings, |
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
), |
|
|
|
|
|
onTap: () { |
|
|
|
|
|
Navigator.of(context).push( |
|
|
|
|
|
MaterialPageRoute(builder: (_) => UpdateProfileScreen())); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox( |
|
|
|
|
|
height: 2.0, |
|
|
|
|
|
), |
|
|
|
|
|
ListTile( |
|
|
|
|
|
title: Text( |
|
|
|
|
|
'Đăng xuất', |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontWeight: FontWeight.w600, |
|
|
|
|
|
fontSize: 16, |
|
|
|
|
|
), |
|
|
|
|
|
textAlign: TextAlign.left, |
|
|
|
|
|
), |
|
|
|
|
|
leading: Icon( |
|
|
|
|
|
Icons.power_settings_new, |
|
|
|
|
|
color: Colors.red, |
|
|
|
|
|
), |
|
|
|
|
|
onTap: () { |
|
|
|
|
|
_clickSignOut(); |
|
|
|
|
|
}, |
|
|
|
|
|
), |
|
|
|
|
|
SizedBox( |
|
|
|
|
|
height: MediaQuery.of(context).padding.bottom, |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
// Column( |
|
|
|
|
|
// children: <Widget>[ |
|
|
|
|
|
// ListTile( |
|
|
|
|
|
// title: Text( |
|
|
|
|
|
// 'Đăng xuất', |
|
|
|
|
|
// style: TextStyle( |
|
|
|
|
|
// fontWeight: FontWeight.w600, |
|
|
|
|
|
// fontSize: 16, |
|
|
|
|
|
// ), |
|
|
|
|
|
// textAlign: TextAlign.left, |
|
|
|
|
|
// ), |
|
|
|
|
|
// trailing: Icon( |
|
|
|
|
|
// Icons.power_settings_new, |
|
|
|
|
|
// color: Colors.red, |
|
|
|
|
|
// ), |
|
|
|
|
|
// onTap: () { |
|
|
|
|
|
// _clickSignOut(); |
|
|
|
|
|
// }, |
|
|
|
|
|
// ), |
|
|
|
|
|
// SizedBox( |
|
|
|
|
|
// height: MediaQuery.of(context).padding.bottom, |
|
|
|
|
|
// ) |
|
|
|
|
|
// ], |
|
|
|
|
|
// ), |
|
|
|
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
enum DrawerIndex { ScanBarcode, Home, Setting } |
|
|
|
|
|
|
|
|
enum DrawerIndex { ScanBarcode, Home, ControlDevice } |
|
|
|
|
|
|
|
|
class DrawerList { |
|
|
class DrawerList { |
|
|
DrawerList({ |
|
|
DrawerList({ |