From 58ec37a7c5e25a6d256e91882f52355bc100ce5b Mon Sep 17 00:00:00 2001 From: tanlinxing Date: Thu, 21 Nov 2024 10:01:14 +0800 Subject: [PATCH] CFG --- .flutter-plugins-dependencies | 2 +- lib/pages/aim_point/aimpoint_page.dart | 4 +- lib/pages/dataAndDevice/real_data.dart | 48 +++++++++++++++++++--- lib/pages/dataAndDevice/real_device.dart | 30 +------------- lib/pages/pass_track/controller.dart | 18 +++++---- lib/pages/pass_track/view.dart | 51 +++++++++++++++--------- 6 files changed, 90 insertions(+), 63 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index c083243..e2ec4c6 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_apple-9.4.5\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.12\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_android-12.0.13\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]},{"name":"permission_handler_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_windows-0.2.1\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","dependencies":[]},{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_html-0.1.3+4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_webrtc","dependencies":["path_provider"]},{"name":"libserialport","dependencies":[]},{"name":"open_settings","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_html","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_html","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]},{"name":"quick_blue","dependencies":[]},{"name":"wifi_iot","dependencies":[]},{"name":"wifi_scan","dependencies":[]}],"date_created":"2024-11-20 19:41:05.654848","version":"3.24.0","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_apple-9.4.5\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"open_settings","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\open_settings-2.0.2\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.12\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_android-12.0.13\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]},{"name":"wifi_iot","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_iot-0.3.19+1\\\\","native_build":true,"dependencies":[]},{"name":"wifi_scan","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\wifi_scan-0.4.1+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","native_build":false,"dependencies":[]},{"name":"flutter_webrtc","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_webrtc-0.9.48+hotfix.1\\\\","native_build":true,"dependencies":[]},{"name":"libserialport","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\git\\\\libserialport-d6d27ef7aaf89e4dfa026db0c50dd3053c546710\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]},{"name":"permission_handler_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_windows-0.2.1\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\pile_nav_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-11.1.1\\\\","dependencies":[]},{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_html-0.1.3+4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_webrtc","dependencies":["path_provider"]},{"name":"libserialport","dependencies":[]},{"name":"open_settings","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_html","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_html","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]},{"name":"quick_blue","dependencies":[]},{"name":"wifi_iot","dependencies":[]},{"name":"wifi_scan","dependencies":[]}],"date_created":"2024-11-21 09:20:20.492124","version":"3.24.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/pages/aim_point/aimpoint_page.dart b/lib/pages/aim_point/aimpoint_page.dart index 0ce6592..e6b9264 100644 --- a/lib/pages/aim_point/aimpoint_page.dart +++ b/lib/pages/aim_point/aimpoint_page.dart @@ -325,7 +325,7 @@ class SightGview extends StatelessWidget { final Size size; @override Widget build(BuildContext context) { - // final Size size = MediaQuery.of(context).size; + final mediaQueryData = MediaQueryData.fromView(View.of(context)); //获取当前屏幕信息 final orientation = mediaQueryData.orientation; //获得设备方向 double rectWidth = size.width; @@ -370,7 +370,7 @@ class SightGview extends StatelessWidget { Card( color: Colors.transparent, elevation: 5.0, - child: AimPointer(size: Size(580, 580)), + child: AimPointer(size: Size(rectWidth, rectWidth)), ), ])), diff --git a/lib/pages/dataAndDevice/real_data.dart b/lib/pages/dataAndDevice/real_data.dart index 76e3971..651e86d 100644 --- a/lib/pages/dataAndDevice/real_data.dart +++ b/lib/pages/dataAndDevice/real_data.dart @@ -11,15 +11,18 @@ import 'controller.dart'; class RealDataContainer extends StatelessWidget { final PlumRealDataController controller = Get.put(PlumRealDataController()); + final RealDataController realdatacontroller = Get.put(RealDataController()); + @override Widget build(BuildContext context) { - // final size = MediaQuery.of(context).size; + final size = MediaQuery.of(context).size; + double rectWidth = size.width; return Container( child: Stack( children: [ RealDataVIew(), Positioned( - bottom: 60, // 根据需要调整位置 + bottom: 120, // 根据需要调整位置 left: 5, // 根据需要调整位置 child: Container( decoration: const BoxDecoration(color: Colors.transparent), @@ -27,9 +30,31 @@ class RealDataContainer extends StatelessWidget { Card( color: Colors.transparent, elevation: 0, - child: AimPointer(size: Size(250,250)), + child: AimPointer(size: Size(250, 250)), ), ]))), + Positioned( + bottom: 30, + left: 35, + child: ElevatedButton( + style: ButtonStyle( + fixedSize: MaterialStateProperty.all(Size(200, 70)), + backgroundColor: MaterialStateProperty.all( + const Color.fromARGB(255, 226, 220, 220))), + child: Text( + realdatacontroller.isClick.value ? ' 暂停 ' : ' 开始 ', + style: TextStyle( + fontSize: 28, + color: realdatacontroller.isClick.value + ? Colors.red + : Colors.green), + ), + onPressed: () => { + realdatacontroller.isClick.value = + !realdatacontroller.isClick.value, + }, + ), + ) ], ), ); @@ -104,15 +129,28 @@ class RealDataVIew extends GetView { style: Theme.of(context).textTheme.titleLarge, ), Text( + // '桩点名称:${controller.name.value} ', '桩点名称:${controller.name.value} ', style: Theme.of(context).textTheme.titleLarge, ), Text( - '夯沉量:${controller.sid.value} ', + // '夯沉量:${controller.sid.value} ', + '桩深:${controller.sid.value} ', style: Theme.of(context).textTheme.titleLarge, ), Text( - '次:${controller.times.value} ', + // '次:${controller.times.value} ', + '垂直度:${controller.times.value} ', + style: Theme.of(context).textTheme.titleLarge, + ), + Text( + // '次:${controller.times.value} ', + '电流:${controller.times.value} ', + style: Theme.of(context).textTheme.titleLarge, + ), + Text( + // '次:${controller.times.value} ', + '灌注量:${controller.times.value} ', style: Theme.of(context).textTheme.titleLarge, ), ], diff --git a/lib/pages/dataAndDevice/real_device.dart b/lib/pages/dataAndDevice/real_device.dart index aeb65a7..51ea708 100644 --- a/lib/pages/dataAndDevice/real_device.dart +++ b/lib/pages/dataAndDevice/real_device.dart @@ -72,35 +72,7 @@ class RealDeviceView extends GetView { fit: BoxFit.contain, ), ), - Positioned( - bottom: 20, - left: 35, - child: ElevatedButton( - style: ButtonStyle( - fixedSize: MaterialStateProperty.all(Size(200, 70)), - - backgroundColor: MaterialStateProperty.all( const Color.fromARGB(255, 226, 220, 220))), - - child: Text( - controller.isClick.value ? ' 暂停 ' : ' 开始 ', - style: TextStyle(fontSize: 28, - color: - controller.isClick.value ? Colors.red : Colors.green), - ), - onPressed: () => { - controller.isClick.value = !controller.isClick.value, - }, - ), - ) - // Positioned( - // bottom: 40, - // right: 30, - // child: ElevatedButton( - // child: - // const Text(" 暂停 ", style: TextStyle(color: Colors.red)), - // onPressed: () => null, - // ), - // ) + ], ), ); diff --git a/lib/pages/pass_track/controller.dart b/lib/pages/pass_track/controller.dart index 3a0e828..e63a6ed 100644 --- a/lib/pages/pass_track/controller.dart +++ b/lib/pages/pass_track/controller.dart @@ -20,6 +20,8 @@ class PassTrackController extends GetxController { var updateCount = 0.obs; var date = "2023-11-1".obs; RecordEntity? currentPoint; + + var isDeviceShow = false.obs; PassTrackController(); @override @@ -136,14 +138,14 @@ class PassTrackController extends GetxController { String now = DateFormat('yyyy-MM-dd').format(DateTime.now()); if ((currentPoint == null && date.value == now) || (DateFormat('yyyy-MM-dd').format(currentPoint!.startTime) == now)) { - // log("${currentPoint?.startTime},now:$now"); - scaffoldMessengerKey.currentState?.showSnackBar( - SnackBar( - content: Text('提示: ${date.value}暂无施工数据'), - duration: const Duration(seconds: 5), - backgroundColor: const Color.fromARGB(255, 230, 162, 60), - ), - ); + + // scaffoldMessengerKey.currentState?.showSnackBar( + // SnackBar( + // content: Text('提示: ${date.value}暂无施工数据'), + // duration: const Duration(seconds: 5), + // backgroundColor: const Color.fromARGB(255, 230, 162, 60), + // ), + // ); } } mapController.updateCount++; diff --git a/lib/pages/pass_track/view.dart b/lib/pages/pass_track/view.dart index 3c2b997..0e9ac88 100644 --- a/lib/pages/pass_track/view.dart +++ b/lib/pages/pass_track/view.dart @@ -10,6 +10,7 @@ import 'package:intl/intl.dart'; import 'package:scence_map/controllers/controller.dart'; import 'package:scence_map/record_entity.dart'; import 'package:scence_map/scence_map.dart'; +import '../../service/pile/device_type.dart'; import '../aim_point/aimpoint_controller.dart'; import '../dataAndDevice/real_data.dart'; import '../dataAndDevice/real_device.dart'; @@ -22,21 +23,35 @@ ScenceMapController mapcontroller = Get.put(ScenceMapController()); class PassTackAndDevice extends StatelessWidget { final RecordEntity? currentPoint; PassTackAndDevice({this.currentPoint}); + final controller = Get.put(PassTrackController()); + @override Widget build(BuildContext context) { - return Row( - children: [ - Expanded(flex: 2, child: RealDataContainer()), - Expanded( - flex: 5, - child: PassTrack(currentPoint: currentPoint), - ), - Expanded( - flex: 2, - child: RealDeviceView(), - ), - ], - ); + if (controller.isDeviceShow.value) { + return Row( + children: [ + Expanded( + flex: 2, + child: RealDeviceView(), + ), + Expanded( + flex: 5, + child: PassTrack(currentPoint: currentPoint), + ), + Expanded(flex: 2, child: RealDataContainer()), + ], + ); + } else { + return Row( + children: [ + Expanded( + flex: 7, + child: PassTrack(currentPoint: currentPoint), + ), + Expanded(flex: 2, child: RealDataContainer()), + ], + ); + } } } @@ -47,7 +62,7 @@ class PassTrack extends GetView { RecordEntity? currentPoint; @override final controller = Get.put(PassTrackController()); - final aimcontroller = Get.find(); + // String str = "播放"; // int sWidth = 0; // int bits = -1; @@ -76,9 +91,10 @@ class PassTrack extends GetView { controller, ) : null; - + return OrientationBuilder(builder: (context, orientation) { - final size = MediaQuery.of(context).size; + final size = MediaQuery.of(context).size; + return Stack( children: [ ScenceMapView( @@ -95,9 +111,8 @@ class PassTrack extends GetView { }, children: const [], ), - SightGview(size:size), + SightGview(size: size), const RealDataShow(), - ], ); });