From 50cf99720b0f345756db95e1ed96f5762429e5a7 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Mon, 6 Jan 2025 08:52:23 +0800 Subject: [PATCH] opt: listsheet Signed-off-by: bggRGjQaUbCoE --- lib/common/widgets/list_sheet.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/common/widgets/list_sheet.dart b/lib/common/widgets/list_sheet.dart index 67218924..c8d0d2aa 100644 --- a/lib/common/widgets/list_sheet.dart +++ b/lib/common/widgets/list_sheet.dart @@ -79,15 +79,17 @@ class _ListSheetContentState extends State if (this.currentIndex != currentIndex) { this.currentIndex = currentIndex; try { - itemScrollController[_index].jumpTo(index: currentIndex); + itemScrollController[_index].jumpTo( + index: currentIndex, + ); } catch (_) {} } } // jump to current if (_ctr != null && widget.index != _ctr?.index) { - _ctr?.animateTo(_index); - Future.delayed(const Duration(milliseconds: 255)).then((_) { + _ctr?.animateTo(_index, duration: const Duration(milliseconds: 200)); + Future.delayed(const Duration(milliseconds: 300)).then((_) { jumpToCurrent(); }); } else {