mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: anim to top
This commit is contained in:
@@ -10,11 +10,7 @@ extension ImageExtension on num {
|
|||||||
extension ScrollControllerExt on ScrollController {
|
extension ScrollControllerExt on ScrollController {
|
||||||
void animToTop() {
|
void animToTop() {
|
||||||
if (!hasClients) return;
|
if (!hasClients) return;
|
||||||
if (offset >= MediaQuery.of(Get.context!).size.height * 5) {
|
animateTo(0,
|
||||||
jumpTo(0);
|
duration: const Duration(milliseconds: 500), curve: Curves.easeInOut);
|
||||||
} else {
|
|
||||||
animateTo(0,
|
|
||||||
duration: const Duration(milliseconds: 500), curve: Curves.easeInOut);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user