mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -16,9 +16,26 @@ class MainReplyController extends ReplyController<MainListReply>
|
||||
|
||||
bool _showFab = true;
|
||||
|
||||
late final AnimationController _fabAnimationCtr;
|
||||
late final CurvedAnimation _curvedAnimation;
|
||||
late final Animation<Offset> fabAnim;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
_fabAnimationCtr = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
)..forward();
|
||||
_curvedAnimation = CurvedAnimation(
|
||||
parent: _fabAnimationCtr,
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
fabAnim = Tween<Offset>(
|
||||
begin: const Offset(0, 2),
|
||||
end: Offset.zero,
|
||||
).animate(_curvedAnimation);
|
||||
|
||||
final args = Get.arguments;
|
||||
oid = args['oid'];
|
||||
replyType = args['replyType'];
|
||||
@@ -52,18 +69,9 @@ class MainReplyController extends ReplyController<MainListReply>
|
||||
@override
|
||||
List<ReplyInfo>? getDataList(MainListReply response) => response.replies;
|
||||
|
||||
late final AnimationController _fabAnimationCtr = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
)..forward();
|
||||
|
||||
late final Animation<Offset> fabAnim = Tween<Offset>(
|
||||
begin: const Offset(0, 2),
|
||||
end: Offset.zero,
|
||||
).animate(CurvedAnimation(parent: _fabAnimationCtr, curve: Curves.easeInOut));
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
_curvedAnimation.dispose();
|
||||
_fabAnimationCtr.dispose();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user