diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 6e72e03..2965e14 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":"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:\\\\workspace\\\\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":"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.10\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_android-12.0.12\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\workspace\\\\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":"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_html-0.1.3+2\\\\","dependencies":[]}]},"dependencyGraph":[{"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-09-03 17:14:21.964802","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":"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:\\\\workspace\\\\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":"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.10\\\\","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_android-12.0.12\\\\","native_build":true,"dependencies":[]},{"name":"quick_blue","path":"D:\\\\workspace\\\\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":"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"linux":[{"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":false,"dependencies":[]}],"windows":[{"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:\\\\workspace\\\\pile_NAV_new\\\\plugins\\\\quick_blue\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"permission_handler_html","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\permission_handler_html-0.1.3+2\\\\","dependencies":[]}]},"dependencyGraph":[{"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-09-04 15:48:54.758524","version":"3.24.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/pages/pile/pileGenerateCard/pileGenerController.dart b/lib/pages/pile/pileGenerateCard/pileGenerController.dart new file mode 100644 index 0000000..787063d --- /dev/null +++ b/lib/pages/pile/pileGenerateCard/pileGenerController.dart @@ -0,0 +1,21 @@ +import 'package:get/get.dart'; + +class PileGenerController extends GetxController { + var isPileCardVisible = false.obs; // 控制生成桩点的卡片是否可见 + var isRealViewCardVisible = false.obs; // 控制生成桩点的卡片是否可见 + @override + void onInit() { + super.onInit(); + // 监听 isRealViewCardVisible 的变化 + ever(isRealViewCardVisible, (bool isVisible) { + if (isVisible) { + isPileCardVisible.value = false; + } + }); + ever(isPileCardVisible, (bool isVisible) { + if (isVisible) { + isRealViewCardVisible.value = false; + } + }); + } +} diff --git a/lib/pages/pile/pileGenerateCard/pileGenerate.dart b/lib/pages/pile/pileGenerateCard/pileGenerate.dart new file mode 100644 index 0000000..061c365 --- /dev/null +++ b/lib/pages/pile/pileGenerateCard/pileGenerate.dart @@ -0,0 +1,341 @@ +import 'dart:math'; + +import 'package:cpnav/service/pile_cm.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:scence_map/controllers/controller.dart'; +import 'package:scence_map/controllers/plumController.dart'; + +import '../../../service/pile/device_type.dart'; +import '../../../service/pile/input.dart'; +import '../../../service/pile/public_widget.dart'; +import 'pileGenerController.dart'; + +final ScenceMapController mapController = Get.find(); +final PlumDataController controller = Get.find(); + +class PileGenerate extends StatefulWidget { + const PileGenerate({super.key}); + + @override + _PileGenerateState createState() => _PileGenerateState(); +} + +class _PileGenerateState extends State { + @override + Widget build(BuildContext context) { + double titleTextWidth = 90; + double inputLength = 120; + FocusNode xFocus = FocusNode(); + FocusNode yFocus = FocusNode(); + FocusNode directionFocus = FocusNode(); + FocusNode pileSpaceFocus = FocusNode(); + FocusNode pileWidthFocus = FocusNode(); + DeviceType deviceType = getDeviceType(context); + double fontSize = 16; + if (deviceType == DeviceType.mobile) { + fontSize = 16; + } else { + fontSize = 20; + } + double centerPointX = controller.centerXY.value.dx; + double centerPointY = controller.centerXY.value.dy; + + final size = MediaQuery.of(context).size; + return OrientationBuilder(builder: ((context, orientation) { + return Scaffold( + appBar: AppBar( + title: const Text("桩点生成"), + toolbarHeight: 30, + leading: IconButton( + icon: Icon(Icons.close), + onPressed: () { + setState(() { + pilecontroller.isPileCardVisible.value = false; + pilecontroller.isRealViewCardVisible.value = false; + }); + }, + ), + ), + body: SizedBox( + height: size.height, + child: Stack( + children: [ + SingleChildScrollView( + child: AlignWrapWidget( + children: [ + Row( + children: [ + const Text('地图显示:'), + Obx(() => Switch( + value: controller.isMap.value, + onChanged: ((value) { + controller.isMap.value = !controller.isMap.value; + }))), + ], + ), + AlignWrapWidget( + children: [ + ElevatedButton( + child: const Text("夯锤坐标"), + onPressed: () => {controller.isDirect.value = false}, + ), + const SizedBox( + width: 10, + ), + ElevatedButton( + child: const Text("桩点坐标"), + onPressed: () => { + controller.isGenerate.value = true, + controller.checkValue.value = "checkPile", + controller.isDirect.value = false, + pilecontroller.isPileCardVisible.value = false, + }), + const SizedBox( + width: 10, + ), + ElevatedButton( + child: const Text("方向设置"), + onPressed: () => { + controller.isGenerate.value = true, + controller.checkValue.value = "checkDirection", + controller.isDirect.value = true, + controller.centerXY.value = + Offset(centerPointX, centerPointY), + pilecontroller.isPileCardVisible.value = false, + }), + ], + ), + Row(children: [ + FixedWidthTextWidget(width: titleTextWidth, text: "X:"), + inputText( + inputLength: inputLength, + value: centerPointX.toString(), + fontsize: fontSize, + focusNode: yFocus, + onChanged: (value) => value.isNotEmpty + ? centerPointY = double.parse(value) + : '') + ]), + Row(children: [ + FixedWidthTextWidget(width: titleTextWidth, text: "Y:"), + inputText( + inputLength: inputLength, + value: centerPointY.toString(), + fontsize: fontSize, + focusNode: xFocus, + onChanged: (value) => value.isNotEmpty + ? centerPointX = double.parse(value) + : '') + ]), + Row(children: [ + FixedWidthTextWidget(width: titleTextWidth, text: "方向(°):"), + inputText( + inputLength: inputLength, + value: controller.direction.toString(), + fontsize: fontSize, + focusNode: directionFocus, + keyboardType: 0, + onChanged: (value) { + if (value.isNotEmpty) { + controller.direction.value = double.parse(value); + // bug 值修改后 绘制没有变化 + controller.angle.value = + controller.direction.value * pi / 180; + } + }) + ]), + Row(children: [ + FixedWidthTextWidget( + width: titleTextWidth + 10, text: "夯点间距(m):"), + inputText( + inputLength: inputLength - 10, + fontsize: fontSize, + value: controller.space.toString(), + focusNode: pileSpaceFocus, + onChanged: (value) => { + value.isNotEmpty + ? controller.space.value = double.parse(value) + : '', + }) + ]), + Row(children: [ + FixedWidthTextWidget( + width: titleTextWidth + 10, text: "宽度(m):"), + inputText( + inputLength: inputLength - 10, + fontsize: fontSize, + value: controller.pileWidth.toString(), + focusNode: pileWidthFocus, + onChanged: (value) => { + value.isNotEmpty + ? controller.pileWidth.value = + double.parse(value) + : '', + }) + ]), + Row(children: [ + const Icon( + Icons.tips_and_updates_outlined, + color: Colors.red, + ), + Text( + controller.isPileId.value + ? '选中桩点:${controller.checkName.value}' + : ' 未选中桩点', + style: TextStyle( + color: !controller.isPileId.value + ? Colors.red + : Colors.black), + ) + ]), + ], + )), + Positioned( + bottom: 10, + child: Row( + children: [ + TextButton( + child: const Text('取消'), + onPressed: () { + controller.isGenerate.value = false; + controller.isDirect.value = false; + controller.isSave.value = false; + // 执行取消的逻辑 + }, + ), + TextButton( + child: const Text('确定'), + onPressed: () { + // 执行确定的逻辑 + var dx = (controller.canvasSize.width) / 2; + var dy = (controller.canvasSize.height) / 2; + var rotation = mapController.rotation.value; + for (int i = 0; i < controller.plumList.length; i++) { + Offset item = controller.plumList[i]; + + var dx1 = ((item.dx - dx) * cos(rotation) + + (item.dy - dy) * sin(rotation)); + var dy1 = -(item.dx - dx) * sin(rotation) + + (item.dy - dy) * cos(rotation); + dx1 = double.parse( + (dx1 * 1000 / 1000).toStringAsFixed(3)); + dy1 = double.parse( + (dy1 * 1000 / 1000).toStringAsFixed(3)); + Offset xy = mapController.ScreenCenter2xy(dx1, dy1); + PilePoint pilePoint = PilePoint( + x: xy.dx, + y: xy.dy, + times: 0, + id: i + 1, + radius: 0.3); + mapController.pilePoints.add(pilePoint); + } + controller.isGenerate.value = false; + controller.isDirect.value = false; + controller.isSave.value = true; + controller.centerXY.value = + Offset(centerPointX, centerPointY); + }, + ), + ], + )) + ], + ), + ), + ); + })); + } +} + +final PileGenerController pilecontroller = Get.put(PileGenerController()); + +//卡片 +class PileGenerateCard extends StatelessWidget { + const PileGenerateCard(); + + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + MediaQueryData mediaQueryData = + MediaQueryData.fromView(WidgetsBinding.instance.window); //获取当前屏幕信息 + final orientation = mediaQueryData.orientation; //获得设备方向 + double rectWidth = size.width; + final deviceType = getDeviceType(context); + if (orientation == Orientation.landscape) { + rectWidth = size.width / 2; + if (deviceType == DeviceType.mobile) { + rectWidth = size.height - 130; + } + } else { + rectWidth = size.height / 2; + if (deviceType == DeviceType.mobile) { + rectWidth = size.width - 5; + } + } + + return Obx(() => Visibility( + visible: pilecontroller.isPileCardVisible.value, + child: Positioned( + right: 0, + top: 0, + width: rectWidth - 30, + height: rectWidth + 45, + child: Stack(children: [ + Container( + decoration: const BoxDecoration(color: Colors.transparent), + child: Stack(children: [ + Card( + color: Colors.transparent, + elevation: 5.0, + child: PileGenerate(), + ), + ])) + ])))); + } +} + +//卡片 +class PileGenerateCard1 extends StatelessWidget { + const PileGenerateCard1(); + + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + MediaQueryData mediaQueryData = + MediaQueryData.fromView(WidgetsBinding.instance.window); //获取当前屏幕信息 + final orientation = mediaQueryData.orientation; //获得设备方向 + double rectWidth = size.width; + final deviceType = getDeviceType(context); + if (orientation == Orientation.landscape) { + rectWidth = size.width / 2; + if (deviceType == DeviceType.mobile) { + rectWidth = size.height - 130; + } + } else { + rectWidth = size.height / 2; + if (deviceType == DeviceType.mobile) { + rectWidth = size.width - 5; + } + } + + return Obx(() => Visibility( + visible: pilecontroller.isRealViewCardVisible.value, + child: Positioned( + right: 0, + top: 0, + width: rectWidth - 30, + height: rectWidth + 45, + child: Stack(children: [ + Container( + decoration: const BoxDecoration(color: Colors.transparent), + child: Stack(children: [ + Card( + color: Colors.transparent, + elevation: 5.0, + child: PileGenerate(), + ), + ])) + ])))); + } +} diff --git a/lib/pages/pile/pileGenerateCard/pilePointTable.dart b/lib/pages/pile/pileGenerateCard/pilePointTable.dart new file mode 100644 index 0000000..0dbe32c --- /dev/null +++ b/lib/pages/pile/pileGenerateCard/pilePointTable.dart @@ -0,0 +1,165 @@ +import 'package:flutter/material.dart'; +import 'package:scence_map/controllers/controller.dart'; + +class PilePointTable extends StatefulWidget { + final List pilePoints; + final Function(List) onUpdate; + + PilePointTable({required this.pilePoints, required this.onUpdate}); + + @override + _PilePointTableState createState() => _PilePointTableState(); +} + +class _PilePointTableState extends State { + List _selected = []; + + @override + void initState() { + super.initState(); + _selected = List.filled(widget.pilePoints.length, false); + } + + void _deleteSelected() { + setState(() { + widget.pilePoints + .removeWhere((point) => _selected[widget.pilePoints.indexOf(point)]); + _selected = List.filled(widget.pilePoints.length, false); + widget.onUpdate(widget.pilePoints); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('桩点列表'), + actions: [ + IconButton( + icon: Icon(Icons.delete), + onPressed: _deleteSelected, + ), + ], + ), + body: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Table( + border: const TableBorder( + verticalInside: BorderSide(color: Colors.grey, width: 1.0), + horizontalInside: BorderSide(color: Colors.grey, width: 1.0), + ), + columnWidths: const { + 0: IntrinsicColumnWidth(), + 1: IntrinsicColumnWidth(), + 2: IntrinsicColumnWidth(), + 3: IntrinsicColumnWidth(), + }, + children: [ + const TableRow( + children: [ + Center(child: Text('选择')), + Center(child: Text('ID')), + Center(child: Text('X')), + Center(child: Text('Y')), + ], + ), + ...List.generate( + widget.pilePoints.length, + (index) => TableRow( + children: [ + TableCell( + verticalAlignment: TableCellVerticalAlignment.middle, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.0), + child: Checkbox( + value: _selected[index], + onChanged: (bool? value) { + setState(() { + _selected[index] = value ?? false; + }); + }, + ), + ), + ), + TableCell( + verticalAlignment: TableCellVerticalAlignment.middle, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.0), + child: Text(widget.pilePoints[index].id.toString()), + ), + ), + TableCell( + verticalAlignment: TableCellVerticalAlignment.middle, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.0), + child: GestureDetector( + onTap: () => _editPilePoint(context, index, 'x'), + child: + Text(widget.pilePoints[index].x.toString()), + ), + ), + ), + TableCell( + verticalAlignment: TableCellVerticalAlignment.middle, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 12.0), + child: GestureDetector( + onTap: () => _editPilePoint(context, index, 'y'), + child: + Text(widget.pilePoints[index].y.toString()), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ); + } + + void _editPilePoint(BuildContext context, int index, String field) { + TextEditingController controller = TextEditingController( + text: field == 'x' + ? widget.pilePoints[index].x.toString() + : widget.pilePoints[index].y.toString(), + ); + + showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: Text('编辑桩点'), + content: TextField( + controller: controller, + keyboardType: TextInputType.number, + decoration: InputDecoration(labelText: field == 'x' ? 'X' : 'Y'), + ), + actions: [ + TextButton( + onPressed: () { + setState(() { + if (field == 'x') { + widget.pilePoints[index].x = double.parse(controller.text); + } else { + widget.pilePoints[index].y = double.parse(controller.text); + } + widget.onUpdate(widget.pilePoints); + }); + Navigator.of(context).pop(); + }, + child: Text('保存'), + ), + TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text('取消'), + ), + ], + ); + }, + ); + } +} diff --git a/lib/pages/pile/pileNav/draw_pile.dart b/lib/pages/pile/pileNav/draw_pile.dart index 9294461..33df7fc 100644 --- a/lib/pages/pile/pileNav/draw_pile.dart +++ b/lib/pages/pile/pileNav/draw_pile.dart @@ -107,10 +107,6 @@ class DrawDirection extends CustomPainter { } } - // if (plumList.isNotEmpty) { - // controller.plumList.value = plumList; - // // controller.update(); - // } } } diff --git a/lib/pages/pile/pileNav/view.dart b/lib/pages/pile/pileNav/view.dart index 61fc599..17f6335 100644 --- a/lib/pages/pile/pileNav/view.dart +++ b/lib/pages/pile/pileNav/view.dart @@ -3,6 +3,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; import 'package:scence_map/controllers/controller.dart'; import 'package:scence_map/controllers/plumController.dart'; +import 'package:scence_map/record_entity.dart'; import 'package:scence_map/scence_map.dart'; import 'package:get/get.dart'; @@ -10,6 +11,7 @@ import 'package:get/get.dart'; import '../../../models/pilePoint/hyrecorditem.dart'; import '../../pass_track/view.dart'; import '../../task/task_page.dart'; +import '../pileGenerateCard/pileGenerate.dart'; import 'draw_pile.dart'; class RealView extends StatefulWidget { @@ -52,16 +54,16 @@ class _RealViewState extends State { Offset sc2xy = scenceMapController.screen2xy0(details.localPosition); controller.centerXY.value = sc2xy; - HyRecordItem? checkPoint = + RecordEntity? checkPoint = scenceMapController.pointInfo(controller.centerXY.value); + if (checkPoint != null) { controller.isPileId.value = true; - controller.checkName.value = checkPoint.tpId.toString(); + // controller.checkName.value = checkPoint.tpId.toString(); } else { controller.isPileId.value = false; controller.checkName.value = "未找到"; } - Scaffold.of(context).openEndDrawer(); } } @@ -186,8 +188,8 @@ class _RealViewState extends State { ), child: const Icon(Icons.keyboard_return), onPressed: () { - Scaffold.of(context).openEndDrawer(); - controller.isDirect.value = false; + pilecontroller.isRealViewCardVisible.value = true; + controller.isDirect.value = true; }, ), )); @@ -201,13 +203,14 @@ class _RealViewState extends State { // child: const ScenceMapView( // children: [], // ), - child:TaskPage(), // 任务页面 - // PassTrack( - // date: '', - // ) + child: TaskPage(), // 任务页面 + // PassTrack( + // date: '', + // ) )), center, back, + PileGenerateCard1() ], ); } diff --git a/lib/pages/pile/rightDra/pileGenerate.dart b/lib/pages/pile/rightDra/pileGenerate.dart deleted file mode 100644 index eeb660d..0000000 --- a/lib/pages/pile/rightDra/pileGenerate.dart +++ /dev/null @@ -1,232 +0,0 @@ -import 'dart:math'; - -import 'package:flutter/material.dart'; -import 'package:get/get.dart'; -import 'package:scence_map/controllers/controller.dart'; -import 'package:scence_map/controllers/plumController.dart'; - -import '../../../service/pile/device_type.dart'; -import '../../../service/pile/input.dart'; -import '../../../service/pile/public_widget.dart'; - -final ScenceMapController mapController = Get.find(); - -class PileGenerate extends GetView { - const PileGenerate({super.key}); - - @override - Widget build(BuildContext context) { - double titleTextWidth = 90; - double inputLength = 120; - FocusNode xFocus = FocusNode(); - FocusNode yFocus = FocusNode(); - FocusNode directionFocus = FocusNode(); - FocusNode pileSpaceFocus = FocusNode(); - FocusNode pileWidthFocus = FocusNode(); - DeviceType deviceType = getDeviceType(context); - double fontSize = 16; - if (deviceType == DeviceType.mobile) { - fontSize = 16; - } else { - fontSize = 20; - } - double centerPointX = controller.centerXY.value.dx; - double centerPointY = controller.centerXY.value.dy; - - final size = MediaQuery.of(context).size; - return Scaffold( - appBar: AppBar( - title: const Text("桩点生成"), - toolbarHeight: 30, - ), - body: SizedBox( - height: size.height, - child: Stack( - children: [ - SingleChildScrollView( - child: AlignWrapWidget( - children: [ - Row( - children: [ - const Text('地图显示:'), - Obx(() => Switch( - value: controller.isMap.value, - onChanged: ((value) { - controller.isMap.value = !controller.isMap.value; - }))), - ], - ), - AlignWrapWidget( - children: [ - ElevatedButton( - child: const Text("夯锤坐标"), - onPressed: () => {controller.isDirect.value = false}, - ), - const SizedBox( - width: 10, - ), - ElevatedButton( - child: const Text("桩点坐标"), - onPressed: () => { - controller.isGenerate.value = true, - controller.checkValue.value = "checkPile", - controller.isDirect.value = false, - // controller.checkValue.value = "checkDirection", - // controller.isDirect.value = true, - // controller.centerXY.value = - // Offset(centerPointX, centerPointY), - }), - const SizedBox( - width: 10, - ), - ElevatedButton( - child: const Text("方向设置"), - onPressed: () => { - controller.isGenerate.value = true, - controller.checkValue.value = "checkDirection", - controller.isDirect.value = true, - controller.centerXY.value = - Offset(centerPointX, centerPointY), - Navigator.pop(context) - }), - ], - ), - Row(children: [ - FixedWidthTextWidget(width: titleTextWidth, text: "X:"), - inputText( - inputLength: inputLength, - value: centerPointX.toString(), - fontsize: fontSize, - focusNode: yFocus, - onChanged: (value) => value.isNotEmpty - ? centerPointY = double.parse(value) - : '') - ]), - Row(children: [ - FixedWidthTextWidget(width: titleTextWidth, text: "Y:"), - inputText( - inputLength: inputLength, - value: centerPointY.toString(), - fontsize: fontSize, - focusNode: xFocus, - onChanged: (value) => value.isNotEmpty - ? centerPointX = double.parse(value) - : '') - ]), - Row(children: [ - FixedWidthTextWidget(width: titleTextWidth, text: "方向(°):"), - inputText( - inputLength: inputLength, - value: controller.direction.toString(), - fontsize: fontSize, - focusNode: directionFocus, - keyboardType: 0, - onChanged: (value) { - if (value.isNotEmpty) { - controller.direction.value = double.parse(value); - // bug 值修改后 绘制没有变化 - controller.angle.value = - controller.direction.value * pi / 180; - } - }) - ]), - Row(children: [ - FixedWidthTextWidget( - width: titleTextWidth + 10, text: "夯点间距(m):"), - inputText( - inputLength: inputLength - 10, - fontsize: fontSize, - value: controller.space.toString(), - focusNode: pileSpaceFocus, - onChanged: (value) => { - value.isNotEmpty - ? controller.space.value = double.parse(value) - : '', - }) - ]), - Row(children: [ - FixedWidthTextWidget( - width: titleTextWidth + 10, text: "宽度(m):"), - inputText( - inputLength: inputLength - 10, - fontsize: fontSize, - value: controller.pileWidth.toString(), - focusNode: pileWidthFocus, - onChanged: (value) => { - value.isNotEmpty - ? controller.pileWidth.value = - double.parse(value) - : '', - }) - ]), - Row(children: [ - const Icon( - Icons.tips_and_updates_outlined, - color: Colors.red, - ), - Text( - controller.isPileId.value - ? '选中桩点:${controller.checkName.value}' - : ' 未选中桩点', - style: TextStyle( - color: !controller.isPileId.value - ? Colors.red - : Colors.black), - ) - ]), - ], - )), - Positioned( - bottom: 10, - child: Row( - children: [ - TextButton( - child: const Text('取消'), - onPressed: () { - controller.isGenerate.value = false; - controller.isDirect.value = false; - controller.isSave.value = false; - // 执行取消的逻辑 - Navigator.of(context).pop(); - }, - ), - TextButton( - child: const Text('确定'), - onPressed: () { - // 执行确定的逻辑 - var dx = (controller.canvasSize.width) / 2; - var dy = (controller.canvasSize.height) / 2; - var rotation = mapController.rotation.value; - for (int i = 0; i < controller.plumList.length; i++) { - Offset item = controller.plumList[i]; - - var dx1 = (item.dx - dx) * cos(rotation) + - (item.dy - dy) * sin(rotation); - var dy1 = -(item.dx - dx) * sin(rotation) + - (item.dy - dy) * cos(rotation); - Offset xy = mapController.ScreenCenter2xy(dx1, dy1); - PilePoint pilePoint = PilePoint( - x: xy.dx, - y: xy.dy, - state: 0, - id: i + 1, - radius: 0.3); - mapController.pilePoints.add(pilePoint); - } - controller.isGenerate.value = false; - controller.isDirect.value = false; - controller.isSave.value = true; - controller.centerXY.value = - Offset(centerPointX, centerPointY); - - Navigator.of(context).pop(); - }, - ), - ], - )) - ], - ), - ), - ); - } -} diff --git a/lib/pages/task/task_page.dart b/lib/pages/task/task_page.dart index e29d64a..ad1e9c4 100644 --- a/lib/pages/task/task_page.dart +++ b/lib/pages/task/task_page.dart @@ -1,99 +1,106 @@ import 'package:cpnav/main.dart'; -import 'package:cpnav/pages/pile/rightDra/pileGenerate.dart'; +import 'package:cpnav/pages/pile/pileGenerateCard/pileGenerate.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:get/get_connect/http/src/utils/utils.dart'; +import 'package:scence_map/controllers/controller.dart'; import 'package:scence_map/record_entity.dart'; import 'package:scence_map/scence_map.dart'; import '../aim_point/aimpoint_page.dart'; import '../pass_track/controller.dart'; import '../pass_track/view.dart'; +import '../pile/pileGenerateCard/pilePointTable.dart'; import '../pile/pileNav/view.dart'; +final ScenceMapController mapcontroller = Get.put(ScenceMapController()); + class TaskManagePage extends StatelessWidget { @override Widget build(BuildContext context) { final size = MediaQuery.of(context).size; - - return Center( - child: Container( - width: size.width * 0.8, - height: size.height * 0.18, - decoration: BoxDecoration( - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.circular(10), - ), - child: SingleChildScrollView( - child: Row(children: [ - SizedBox(width: 16), - Icon(Icons.task, size: 50, color: Color.fromARGB(164, 75, 73, 73)), - SizedBox(width: 16), - Container( - width: size.width * 0.4, - child: const Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5), - Text( - '任务', - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - Row(children: [ - Expanded( - child: TextField( - keyboardType: TextInputType.emailAddress, - decoration: InputDecoration( - labelText: "任务:", - hintText: "", - // prefixIcon: Icon(Icons.email), - border: InputBorder.none, //隐藏下划线 - labelStyle: TextStyle( - fontSize: 16, color: Color.fromARGB(164, 75, 73, 73)), - ), - ), - ), - SizedBox(width: 5), - Expanded( - child: TextField( - keyboardType: TextInputType.emailAddress, - decoration: InputDecoration( - labelText: "桩点数:", - hintText: "0", - // prefixIcon: Icon(Icons.email), - border: InputBorder.none, //隐藏下划线 - labelStyle: TextStyle( - fontSize: 16, color: Color.fromARGB(164, 75, 73, 73)), - ), - ), - ), - ]), - ], - ), + return OrientationBuilder(builder: ((context, orientation) { + return Center( + child: Container( + width: size.width * 0.8, + height: size.height * 0.18, + decoration: BoxDecoration( + border: Border.all(color: Colors.black), + borderRadius: BorderRadius.circular(10), ), - SizedBox(width: 150), - Container( - alignment: Alignment.centerLeft, - child: Container( - child: Row(children: [ - const Text( - '编辑', - style: TextStyle( - fontSize: 14, color: Color.fromARGB(164, 75, 73, 73)), - ), - SizedBox(width: 12), - InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => RealView()), - ); - }, - child: const Icon(Icons.arrow_forward_ios, - size: 30, color: Color.fromARGB(164, 75, 73, 73)), - ) - ]))) - ])), - )); + child: SingleChildScrollView( + child: Row(children: [ + SizedBox(width: 16), + Icon(Icons.task, size: 50, color: Color.fromARGB(164, 75, 73, 73)), + SizedBox(width: 16), + Container( + width: size.width * 0.4, + child: const Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 5), + Text( + '任务', + style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + Row(children: [ + Expanded( + child: TextField( + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration( + labelText: "任务:", + hintText: "", + // prefixIcon: Icon(Icons.email), + border: InputBorder.none, //隐藏下划线 + labelStyle: TextStyle( + fontSize: 16, + color: Color.fromARGB(164, 75, 73, 73)), + ), + ), + ), + SizedBox(width: 5), + Expanded( + child: TextField( + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration( + labelText: "桩点数:", + hintText: "0", + // prefixIcon: Icon(Icons.email), + border: InputBorder.none, //隐藏下划线 + labelStyle: TextStyle( + fontSize: 16, + color: Color.fromARGB(164, 75, 73, 73)), + ), + ), + ), + ]), + ], + ), + ), + SizedBox(width: 150), + Container( + alignment: Alignment.centerLeft, + child: Container( + child: Row(children: [ + const Text( + '编辑', + style: TextStyle( + fontSize: 14, color: Color.fromARGB(164, 75, 73, 73)), + ), + SizedBox(width: 12), + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => RealView()), + ); + }, + child: const Icon(Icons.arrow_forward_ios, + size: 30, color: Color.fromARGB(164, 75, 73, 73)), + ) + ]))) + ])), + )); + })); } } @@ -107,27 +114,18 @@ class TaskPage extends StatelessWidget { MediaQueryData.fromView(WidgetsBinding.instance.window); //获取当前屏幕信息 final orientation = mediaQueryData.orientation; //获得设备方向 bool isPortrait = Orientation.portrait == orientation ? true : false; - List children = [ - Expanded( - child: ScenceMapView( - children: [], - onUpdate: (Offset center, double scale, double rotation) { - print("center:$center scale:$scale rotation:$rotation"); - }, - forGroundPainter: BorderPainter(controller), - onUpdatePilePoint: - (RecordEntity? selectedPilePoint, double scale, double rotation) { - print( - "selectedPilePoint:$selectedPilePoint scale:$scale rotation:$rotation"); - }, - ), - ), - ]; - if (isPortrait) { - return Scaffold( + + return Scaffold( endDrawer: Drawer( - width: size.width * .8, - child: const PileGenerate(), + width: size.width * .5, + child: PilePointTable( + pilePoints: mapcontroller.pilePoints, + onUpdate: (updatedPilePoints) { + // 这里可以处理更新后的桩点列表 + print("生成桩点$updatedPilePoints,"); + mapController.recordList.add(updatedPilePoints as RecordEntity); + }, + ), ), appBar: AppBar( title: Text('任务页面'), @@ -136,39 +134,38 @@ class TaskPage extends StatelessWidget { child: SizedBox( height: 30, child: Builder( - builder: (context) => InkWell( - child: Icon( - Icons.settings_outlined, - size: 35, - color: appcontroller.isDarkMode.value - ? Colors.white70 - : const Color.fromARGB(200, 29, 28, 28), + builder: (context) => Obx( + () => InkWell( + child: Icon( + Icons.close, + size: 35, + color: appcontroller.isDarkMode.value + ? Colors.white70 + : const Color.fromARGB(200, 29, 28, 28), + ), + onTap: () => Scaffold.of(context).openEndDrawer(), ), - onTap: () => Scaffold.of(context).openEndDrawer(), + + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => PilePointTable( + // pilePoints: mapcontroller.pilePoints, + // onUpdate: (updatedPilePoints) { + // // 这里可以处理更新后的桩点列表 + // print("生成桩点$updatedPilePoints,"); + // }, + // ), + // )), ), ), ), - ) - ], - ), - body: Column( - children: children, - ), - ); - } else { - return Scaffold( - endDrawer: Drawer( - width: size.width * .8, - child: const PileGenerate(), - ), - appBar: AppBar( - title: Text('任务页面'), - actions: [ + ), UnconstrainedBox( child: SizedBox( height: 30, - child: Builder( - builder: (context) => InkWell( + child: Obx( + () => InkWell( child: Icon( Icons.settings_outlined, size: 35, @@ -176,17 +173,30 @@ class TaskPage extends StatelessWidget { ? Colors.white70 : const Color.fromARGB(200, 29, 28, 28), ), - onTap: () => Scaffold.of(context).openEndDrawer(), + onTap: () => pilecontroller.isPileCardVisible.value = true, ), ), ), - ) + ), ], ), - body: Row( - children: children, - ), - ); - } + body: Stack( + children: [ + ScenceMapView( + children: [], + onUpdate: (Offset center, double scale, double rotation) { + print("center:$center scale:$scale rotation:$rotation"); + }, + forGroundPainter: BorderPainter(controller), + onUpdatePilePoint: (RecordEntity? selectedPilePoint, double scale, + double rotation) { + print( + "selectedPilePoint:$selectedPilePoint scale:$scale rotation:$rotation"); + }, + ), + // ), + if (pilecontroller.isPileCardVisible.value) PileGenerateCard(), + ], + )); } }