fix: anim to top

This commit is contained in:
bggRGjQaUbCoE
2024-08-30 14:07:46 +08:00
parent d9eab8de47
commit ecefc4bdd5
9 changed files with 31 additions and 69 deletions

View File

@@ -1,3 +1,4 @@
import 'package:PiliPalaX/utils/extension.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:PiliPalaX/http/search.dart';
@@ -42,14 +43,8 @@ class SearchPanelController extends GetxController {
}
// 返回顶部并刷新
void animateToTop() async {
if (scrollController.offset >=
MediaQuery.of(Get.context!).size.height * 5) {
scrollController.jumpTo(0);
} else {
await scrollController.animateTo(0,
duration: const Duration(milliseconds: 500), curve: Curves.easeInOut);
}
void animateToTop() {
scrollController.animToTop();
}
void onPushDetail(keyword, resultList) async {