From 3497e3fd1ca031bce2395b805c70cf1374b15eb1 Mon Sep 17 00:00:00 2001 From: LiXiaoqi <2360211477@qq.com> Date: Sat, 7 Sep 2024 17:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BB=98=E5=88=B6=E7=BD=91?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/pass_track/view.dart | 26 ++++++++++++++++---------- plugins/pass_track | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/pages/pass_track/view.dart b/lib/pages/pass_track/view.dart index 23a3f64..50fb979 100644 --- a/lib/pages/pass_track/view.dart +++ b/lib/pages/pass_track/view.dart @@ -88,6 +88,8 @@ class _PasstrackState extends State { var f = initPlatformState(); f.then((void _) { + _passTrackPlugin.setGridColor(const Color.fromARGB(255, 0, 0, 0).value); + _passTrackPlugin.drawGrid(); var future = controller.getHisFileList(_passTrackPlugin); future.then((value) { _passTrackPlugin.setScale(1); @@ -97,9 +99,15 @@ class _PasstrackState extends State { for (var item in controller.coorTransMap.entries) { print("tid:${item.key} value:${item.value}"); } - _passTrackPlugin.generateTile(0, value); + // 统计用时 获取当前时间 + var start = DateTime.now().millisecondsSinceEpoch; + // _passTrackPlugin.generateTile(0, value); _passTrackPlugin.waitForTile(); + // _passTrackPlugin.drawGrid(); _passTrackPlugin.playTrack(0, value, true, 0, ffi.nullptr); + // 获取当前时间 + var end = DateTime.now().millisecondsSinceEpoch; + print("耗时:${end - start}"); }); }); } @@ -134,13 +142,13 @@ class _PasstrackState extends State { ScenceMapView( children: [ Positioned( - top: 0, - left: 0, - child: SizedBox( - width: sWidth * 1.0, - height: sWidth * 1.0, - // child: Text('Running on: $_platformVersion\n'), - child: Texture(textureId: fileHandle.textureId))), + top: 0, + left: 0, + child: SizedBox( + width: sWidth * 1.0, + height: sWidth * 1.0, + // child: Text('Running on: $_platformVersion\n'), + child: Texture(textureId: fileHandle.textureId))), ], onUpdate: (Offset center, double scale, double rotation) { print("center:$center scale:$scale rotation:$rotation"); @@ -255,7 +263,6 @@ class _PasstrackState extends State { ), const SizedBox(width: 12), Column( - children: [ const Text("此处遍数:0"), StreamBuilder( @@ -286,7 +293,6 @@ class _PasstrackState extends State { ), ], ), - ], ), ), diff --git a/plugins/pass_track b/plugins/pass_track index 26455a0..bc4de9c 160000 --- a/plugins/pass_track +++ b/plugins/pass_track @@ -1 +1 @@ -Subproject commit 26455a018ed9cdda8413c8477baeaa38bd57499f +Subproject commit bc4de9cc6145dd03116e9b0557902d87776e9671