From a08a07e8453ba822407166b6c6dbd88f5d1a904a Mon Sep 17 00:00:00 2001 From: tanlinxing Date: Mon, 9 Sep 2024 15:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/pass_track/view.dart | 4 +++- plugins/pass_track | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/pass_track/view.dart b/lib/pages/pass_track/view.dart index 6438b19..af6b1bd 100644 --- a/lib/pages/pass_track/view.dart +++ b/lib/pages/pass_track/view.dart @@ -105,6 +105,7 @@ class _PasstrackState extends State { _passTrackPlugin.waitForTile(() { var start = DateTime.now().millisecondsSinceEpoch; print("len: ${_passTrackPlugin.allTileCnt()}"); + controller.allLen = _passTrackPlugin.allTileCnt(); _rangevalues = SfRangeValues(0, _passTrackPlugin.allTileCnt()); _passTrackPlugin.playTrack(0, _passTrackPlugin.allTileCnt(), true, 0, ffi.nullptr); var end = DateTime.now().millisecondsSinceEpoch; @@ -167,7 +168,8 @@ class _PasstrackState extends State { child: SfRangeSlider( min: 0.0, // max: maxLength, - max: controller.allLen > 0 + max: + controller.allLen > 0 ? controller.allLen : 1.0, // 确保 max 大于 0 values: _rangevalues, diff --git a/plugins/pass_track b/plugins/pass_track index 30a101b..0b6aef3 160000 --- a/plugins/pass_track +++ b/plugins/pass_track @@ -1 +1 @@ -Subproject commit 30a101b8415cd162ab14f661f6f75ac7751962d3 +Subproject commit 0b6aef315a6b7b05eec413cc6e9368611fad8e2b