opt to top

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-18 22:41:44 +08:00
parent 40502e3bff
commit 34949b8a7f
4 changed files with 17 additions and 13 deletions

View File

@@ -131,6 +131,16 @@ class VideoDetailController extends GetxController
max(max(Get.height, Get.width) * 0.65, min(Get.height, Get.width));
late double videoHeight = minVideoHeight;
void animToTop() {
if (scrollKey.currentState?.outerController.hasClients == true) {
scrollKey.currentState!.outerController.animateTo(
scrollKey.currentState!.outerController.offset,
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
);
}
}
void setVideoHeight() {
String direction = firstVideo.width != null && firstVideo.height != null
? firstVideo.width! > firstVideo.height!