mod: anim to top

This commit is contained in:
bggRGjQaUbCoE
2024-08-31 16:30:40 +08:00
parent eea025edad
commit 2aa372da04

View File

@@ -10,11 +10,7 @@ extension ImageExtension on num {
extension ScrollControllerExt on ScrollController {
void animToTop() {
if (!hasClients) return;
if (offset >= MediaQuery.of(Get.context!).size.height * 5) {
jumpTo(0);
} else {
animateTo(0,
duration: const Duration(milliseconds: 500), curve: Curves.easeInOut);
}
animateTo(0,
duration: const Duration(milliseconds: 500), curve: Curves.easeInOut);
}
}