This commit is contained in:
wyf
2025-04-12 18:13:35 +08:00
parent 9396f18d09
commit 146462b467
17 changed files with 1446 additions and 816 deletions

View File

@@ -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",