mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: listsheet
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -79,15 +79,17 @@ class _ListSheetContentState extends State<ListSheetContent>
|
|||||||
if (this.currentIndex != currentIndex) {
|
if (this.currentIndex != currentIndex) {
|
||||||
this.currentIndex = currentIndex;
|
this.currentIndex = currentIndex;
|
||||||
try {
|
try {
|
||||||
itemScrollController[_index].jumpTo(index: currentIndex);
|
itemScrollController[_index].jumpTo(
|
||||||
|
index: currentIndex,
|
||||||
|
);
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// jump to current
|
// jump to current
|
||||||
if (_ctr != null && widget.index != _ctr?.index) {
|
if (_ctr != null && widget.index != _ctr?.index) {
|
||||||
_ctr?.animateTo(_index);
|
_ctr?.animateTo(_index, duration: const Duration(milliseconds: 200));
|
||||||
Future.delayed(const Duration(milliseconds: 255)).then((_) {
|
Future.delayed(const Duration(milliseconds: 300)).then((_) {
|
||||||
jumpToCurrent();
|
jumpToCurrent();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user