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