mod: 缓存sheetBottom高度

This commit is contained in:
guozhigq
2023-07-22 22:47:00 +08:00
parent eab9e4149a
commit 90f05931f1
8 changed files with 32 additions and 31 deletions

View File

@ -116,13 +116,13 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
}
// 展示二级回复
void replyReply(replyItem, paddingTop) {
void replyReply(replyItem) {
VideoDetailController videoDetailCtr =
Get.find<VideoDetailController>(tag: Get.arguments['heroTag']);
videoDetailCtr.oid = replyItem.replies!.first.oid;
videoDetailCtr.fRpid = replyItem.rpid!;
videoDetailCtr.firstFloor = replyItem;
videoDetailCtr.showReplyReplyPanel(paddingTop);
videoDetailCtr.showReplyReplyPanel();
}
@override
@ -134,7 +134,6 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
@override
Widget build(BuildContext context) {
double paddingTop = MediaQuery.of(context).padding.top;
return RefreshIndicator(
onRefresh: () async {
setState(() {});
@ -180,8 +179,8 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
_videoReplyController.replyList[index],
showReplyRow: true,
replyLevel: replyLevel,
replyReply: (replyItem, paddingTop) =>
replyReply(replyItem, paddingTop),
replyReply: (replyItem) =>
replyReply(replyItem),
);
}
},
@ -234,7 +233,6 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
oid: IdUtils.bv2av(Get.parameters['bvid']!),
root: 0,
parent: 0,
paddingTop: paddingTop,
);
},
).then(

View File

@ -229,7 +229,6 @@ class ReplyItem extends StatelessWidget {
// 感谢、回复、复制
Widget bottonAction(context, replyControl) {
var color = Theme.of(context).colorScheme.outline;
double paddingTop = MediaQuery.of(context).padding.top;
return Row(
children: [
const SizedBox(width: 48),
@ -283,7 +282,6 @@ class ReplyItem extends StatelessWidget {
oid: replyItem!.oid,
root: replyItem!.rpid,
parent: replyItem!.rpid,
paddingTop: paddingTop,
replyType: replyType,
);
},
@ -347,7 +345,6 @@ class ReplyItemRow extends StatelessWidget {
Widget build(BuildContext context) {
bool isShow = replyControl!.isShow!;
int extraRow = replyControl != null && isShow ? 1 : 0;
double paddingTop = MediaQuery.of(context).padding.top;
return Container(
margin: const EdgeInsets.only(left: 42, right: 4, top: 0),
child: Material(
@ -360,7 +357,7 @@ class ReplyItemRow extends StatelessWidget {
children: [
for (var i = 0; i < replies!.length; i++) ...[
InkWell(
onTap: () => replyReply!(replyItem, paddingTop),
onTap: () => replyReply!(replyItem),
child: Container(
width: double.infinity,
padding: EdgeInsets.fromLTRB(
@ -410,7 +407,7 @@ class ReplyItemRow extends StatelessWidget {
],
if (extraRow == 1)
InkWell(
onTap: () => replyReply!(replyItem, paddingTop),
onTap: () => replyReply!(replyItem),
child: Container(
width: double.infinity,
padding: const EdgeInsets.fromLTRB(8, 5, 8, 8),