mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 02:58:39 +00:00
refa: vertical video page (#328)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,8 +6,11 @@ import 'package:PiliPlus/http/reply.dart';
|
||||
import 'package:PiliPlus/utils/global_data.dart';
|
||||
import 'package:PiliPlus/utils/id_utils.dart';
|
||||
import 'package:fixnum/fixnum.dart' as $fixnum;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get_state_manager/src/rx_flutter/rx_ticket_provider_mixin.dart';
|
||||
|
||||
class VideoReplyController extends ReplyController {
|
||||
class VideoReplyController extends ReplyController
|
||||
with GetTickerProviderStateMixin {
|
||||
VideoReplyController({required this.aid});
|
||||
// 视频aid 请求时使用的oid
|
||||
int aid;
|
||||
@@ -15,6 +18,25 @@ class VideoReplyController extends ReplyController {
|
||||
@override
|
||||
dynamic get sourceId => IdUtils.av2bv(aid);
|
||||
|
||||
bool _isFabVisible = true;
|
||||
late final AnimationController fabAnimationCtr = AnimationController(
|
||||
vsync: this, duration: const Duration(milliseconds: 100))
|
||||
..forward();
|
||||
|
||||
void showFab() {
|
||||
if (!_isFabVisible) {
|
||||
_isFabVisible = true;
|
||||
fabAnimationCtr.forward();
|
||||
}
|
||||
}
|
||||
|
||||
void hideFab() {
|
||||
if (_isFabVisible) {
|
||||
_isFabVisible = false;
|
||||
fabAnimationCtr.reverse();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<LoadingState> customGetData() => GlobalData().grpcReply
|
||||
? ReplyHttp.replyListGrpc(
|
||||
@@ -34,4 +56,10 @@ class VideoReplyController extends ReplyController {
|
||||
page: currentPage,
|
||||
antiGoodsReply: antiGoodsReply,
|
||||
);
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
fabAnimationCtr.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user