更新
This commit is contained in:
@@ -61,7 +61,7 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
|
||||
List arr = [
|
||||
HomePage(),
|
||||
SleepReportPage(),
|
||||
// SleepReportPage(),
|
||||
EPage(),
|
||||
MessagePage(),
|
||||
MinePage(),
|
||||
@@ -91,43 +91,10 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
);
|
||||
} else {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: arr[controller.model.currentIndex],
|
||||
floatingActionButtonAnimator:
|
||||
FloatingActionButtonAnimator.noAnimation,
|
||||
// floatingActionButton: Stack(
|
||||
// alignment: Alignment.center,
|
||||
// children: [
|
||||
// Positioned(
|
||||
// bottom: 10.rpx,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// print("index 3");
|
||||
// if (globalController.model.deviceList.length == 0) {
|
||||
// showToast("请先绑定设备");
|
||||
// return;
|
||||
// }
|
||||
// if (globalController.model.deviceMain == null ||
|
||||
// globalController.model.deviceMain["mac"] == null) {
|
||||
// globalController.model.deviceMain =
|
||||
// globalController.model.deviceList[0];
|
||||
// globalController.updateAll();
|
||||
// }
|
||||
|
||||
// controller.model.currentIndex = 2;
|
||||
// controller.updateAll();
|
||||
// },
|
||||
// child: Image.asset(
|
||||
// gaplessPlayback: true,
|
||||
// excludeFromSemantics: true,
|
||||
// controller.model.currentIndex == 2
|
||||
// ? "assets/images/icon_sleep_light.png"
|
||||
// : "assets/images/icon_sleep_dark.png",
|
||||
// width: 120.rpx,
|
||||
// height: 120.rpx,
|
||||
// ),
|
||||
// )),
|
||||
// ],
|
||||
// ),
|
||||
floatingActionButtonLocation:
|
||||
FloatingActionButtonLocation.centerDocked,
|
||||
bottomNavigationBar: Theme(
|
||||
@@ -135,17 +102,14 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
splashFactory: NoSplash.splashFactory,
|
||||
highlightColor: Colors.transparent),
|
||||
child: BottomNavigationBar(
|
||||
unselectedItemColor: Colors.white,
|
||||
selectedItemColor: stringToColor("#D3B684"),
|
||||
unselectedItemColor: themeController.currentColor.sc4,
|
||||
selectedItemColor: themeController.currentColor.sc1,
|
||||
backgroundColor: themeController.currentColor.sc5,
|
||||
selectedFontSize: 26.rpx,
|
||||
unselectedFontSize: 26.rpx,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
currentIndex: controller.model.currentIndex,
|
||||
onTap: (index) {
|
||||
// if(controller.model.currentIndex == 2) {
|
||||
// arr[2].closeBefore();
|
||||
// }
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
if (controller.model.currentIndex != 1) {
|
||||
globalController.model.hideBottomNavigationBar = false;
|
||||
@@ -158,8 +122,8 @@ class MainPageBottomChange extends GetView<MainPageController> {
|
||||
items: [
|
||||
getBottomNavigationBarItem("assets/img/menu/home.svg",
|
||||
"assets/img/menu/n_home.svg", "菜单.首页".tr),
|
||||
getBottomNavigationBarItem("assets/img/menu/report.svg",
|
||||
"assets/img/menu/n_report.svg", "菜单.报告".tr),
|
||||
// getBottomNavigationBarItem("assets/img/menu/report.svg",
|
||||
// "assets/img/menu/n_report.svg", "菜单.报告".tr),
|
||||
getBottomNavigationBarItem("assets/img/menu/e.svg",
|
||||
"assets/img/menu/n_e.svg", "菜单.小e".tr),
|
||||
getBottomNavigationBarItem("assets/img/menu/message.svg",
|
||||
|
||||
Reference in New Issue
Block a user