修改ui设计错误
This commit is contained in:
@@ -1,160 +1,9 @@
|
||||
// import 'dart:io';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:get/get.dart';
|
||||
// import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
// import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
// import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart';
|
||||
// import 'package:vbvs_app/controller/message/message_controller.dart';
|
||||
// import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
// import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
// import 'package:vbvs_app/enum/LoginStatus.dart';
|
||||
// import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||
// import 'package:vbvs_app/pages/main_bottom/e_page.dart';
|
||||
// import 'package:vbvs_app/pages/main_bottom/home_page.dart';
|
||||
// import 'package:vbvs_app/pages/main_bottom/message_page.dart';
|
||||
// import 'package:vbvs_app/pages/main_bottom/mine_page.dart';
|
||||
|
||||
// class MainPageBBottomChange extends StatefulWidget {
|
||||
// const MainPageBBottomChange({super.key});
|
||||
|
||||
// @override
|
||||
// State<MainPageBBottomChange> createState() => _MainPageBottomChangeState();
|
||||
// }
|
||||
|
||||
// class _MainPageBottomChangeState extends State<MainPageBBottomChange>
|
||||
// with SingleTickerProviderStateMixin {
|
||||
// final GlobalController globalController = Get.find();
|
||||
// final ThemeController themeController = Get.find();
|
||||
// final MessageController messageController = Get.find();
|
||||
// final MainPageController controller = Get.find();
|
||||
// final UserInfoController userInfoController = Get.find();
|
||||
|
||||
// late AnimationController _animationController;
|
||||
// late Animation<double> _positionAnimation;
|
||||
|
||||
// final List<Widget> pages = [
|
||||
// const HomePage(),
|
||||
// const EPage(),
|
||||
// const MessagePage(),
|
||||
// const MinePage(),
|
||||
// ];
|
||||
|
||||
// final List<String> titles = ['首页', '报告', '控制', '我的'];
|
||||
// final List<IconData> icons = [
|
||||
// Icons.home,
|
||||
// Icons.android,
|
||||
// Icons.message,
|
||||
// Icons.person,
|
||||
// ];
|
||||
|
||||
// int selectedIndex = 0;
|
||||
// double currentPosition = 0.0;
|
||||
|
||||
// DateTime? _lastBackPressedTime;
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// selectedIndex = controller.model.currentIndex;
|
||||
// currentPosition = selectedIndex.toDouble();
|
||||
|
||||
// _animationController = AnimationController(
|
||||
// vsync: this,
|
||||
// duration: const Duration(milliseconds: 300),
|
||||
// );
|
||||
|
||||
// _positionAnimation = Tween<double>(
|
||||
// begin: currentPosition,
|
||||
// end: currentPosition,
|
||||
// ).animate(CurvedAnimation(
|
||||
// parent: _animationController,
|
||||
// curve: Curves.easeOut,
|
||||
// ))
|
||||
// ..addListener(() {
|
||||
// setState(() {});
|
||||
// });
|
||||
// }
|
||||
|
||||
// void _onTabTapped(int index) {
|
||||
// bool isLoggedIn = userInfoController.model.login == LoginStatus.LOGIN.code;
|
||||
|
||||
// if ((index == 1 || index == 2) && !isLoggedIn) {
|
||||
// TopSlideNotification.show(context, text: "必须登录提示".tr);
|
||||
// Future.delayed(const Duration(milliseconds: 100), () {
|
||||
// Get.toNamed("/loginPage");
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
// if (selectedIndex != index) {
|
||||
// final begin = currentPosition;
|
||||
// final end = index.toDouble();
|
||||
// _positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
||||
// CurvedAnimation(parent: _animationController, curve: Curves.easeOut),
|
||||
// )..addListener(() {
|
||||
// setState(() {});
|
||||
// });
|
||||
|
||||
// _animationController.forward(from: 0.0);
|
||||
// currentPosition = end;
|
||||
// selectedIndex = index;
|
||||
|
||||
// controller.model.currentIndex = index;
|
||||
// controller.updateAll();
|
||||
// }
|
||||
// }
|
||||
|
||||
// @override
|
||||
// void dispose() {
|
||||
// _animationController.dispose();
|
||||
// super.dispose();
|
||||
// }
|
||||
|
||||
// Future<bool> _handleBackPressed() async {
|
||||
// final now = DateTime.now();
|
||||
// if (_lastBackPressedTime == null ||
|
||||
// now.difference(_lastBackPressedTime!) > const Duration(seconds: 2)) {
|
||||
// _lastBackPressedTime = now;
|
||||
// TopSlideNotification.show(context, text: "滑动退出提醒".tr);
|
||||
// return false;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return PopScope(
|
||||
// canPop: false,
|
||||
// onPopInvokedWithResult: (disposition, result) async {
|
||||
// if (Platform.isAndroid) {
|
||||
// final exit = await _handleBackPressed();
|
||||
// if (exit) SystemNavigator.pop();
|
||||
// }
|
||||
// },
|
||||
// child: Obx(() {
|
||||
// final hideBar = globalController.model.hideBottomNavigationBar;
|
||||
// return Scaffold(
|
||||
// backgroundColor: Colors.transparent,
|
||||
// body: pages[controller.model.currentIndex],
|
||||
// bottomNavigationBar: hideBar
|
||||
// ? null
|
||||
// : BezierBottomNavigationBar(
|
||||
// selectedIndex: selectedIndex,
|
||||
// animatedPosition: _positionAnimation.value,
|
||||
// icons: icons,
|
||||
// titles: titles,
|
||||
// onTap: _onTabTapped,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device_list.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/page/register_page.dart';
|
||||
|
||||
@@ -182,7 +31,9 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
NewHomePage(),
|
||||
// PeopleInfoPage(),
|
||||
// Text('报告'),
|
||||
RegisterPage(),
|
||||
// RegisterPage(),
|
||||
// ShareDeviceWidget(),
|
||||
DeviceListPage(),
|
||||
// FindPasswordPage(),
|
||||
// Smys(),
|
||||
MattressControlPage(),
|
||||
|
||||
Reference in New Issue
Block a user