mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -7,6 +7,7 @@ import 'package:PiliPlus/common/widgets/view_safe_area.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo;
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/common/fab_mixin.dart';
|
||||
import 'package:PiliPlus/pages/main_reply/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
|
||||
@@ -38,7 +39,8 @@ class MainReplyPage extends StatefulWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _MainReplyPageState extends State<MainReplyPage> {
|
||||
class _MainReplyPageState extends State<MainReplyPage>
|
||||
with SingleTickerProviderStateMixin, FabMixin {
|
||||
final _controller = Get.put(
|
||||
MainReplyController(),
|
||||
tag: Utils.generateRandomString(8),
|
||||
@@ -62,9 +64,9 @@ class _MainReplyPageState extends State<MainReplyPage> {
|
||||
onNotification: (notification) {
|
||||
final direction = notification.direction;
|
||||
if (direction == .forward) {
|
||||
_controller.showFab();
|
||||
showFab();
|
||||
} else if (direction == .reverse) {
|
||||
_controller.hideFab();
|
||||
hideFab();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
@@ -87,22 +89,26 @@ class _MainReplyPageState extends State<MainReplyPage> {
|
||||
),
|
||||
).constraintWidth(),
|
||||
),
|
||||
floatingActionButtonLocation: const NoBottomPaddingFabLocation(),
|
||||
floatingActionButton: SlideTransition(
|
||||
position: _controller.fabAnim,
|
||||
child: FloatingActionButton(
|
||||
heroTag: null,
|
||||
onPressed: () {
|
||||
try {
|
||||
feedBack();
|
||||
_controller.onReply(
|
||||
null,
|
||||
oid: _controller.oid,
|
||||
replyType: _controller.replyType,
|
||||
);
|
||||
} catch (_) {}
|
||||
},
|
||||
tooltip: '评论',
|
||||
child: const Icon(Icons.reply),
|
||||
position: fabAnimation,
|
||||
child: Padding(
|
||||
padding: .only(bottom: padding.bottom + kFloatingActionButtonMargin),
|
||||
child: FloatingActionButton(
|
||||
heroTag: null,
|
||||
onPressed: () {
|
||||
try {
|
||||
feedBack();
|
||||
_controller.onReply(
|
||||
null,
|
||||
oid: _controller.oid,
|
||||
replyType: _controller.replyType,
|
||||
);
|
||||
} catch (_) {}
|
||||
},
|
||||
tooltip: '评论',
|
||||
child: const Icon(Icons.reply),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user