fix_视频评论安全区域
This commit is contained in:
parent
0fd1ed8799
commit
9902980bf8
@ -285,14 +285,17 @@ class _VideoDetailPageState extends State<VideoDetailPage> {
|
|||||||
),
|
),
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return CommentBottomSheet(
|
return SafeArea(
|
||||||
|
child: CommentBottomSheet(
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
onCommentCountChanged: (newCount) {
|
onCommentCountChanged: (newCount) {
|
||||||
// 更新视频的评论数量
|
// 更新视频的评论数量
|
||||||
setState(() {
|
setState(() {
|
||||||
videoData['commentsCounts'] = newCount;
|
videoData['commentsCounts'] = newCount;
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -771,7 +771,8 @@ class _AttentionModuleState extends State<AttentionModule> {
|
|||||||
),
|
),
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return CommentBottomSheet(
|
return SafeArea(
|
||||||
|
child: CommentBottomSheet(
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
onCommentCountChanged: (newCount) {
|
onCommentCountChanged: (newCount) {
|
||||||
// 更新对应视频的评论数量
|
// 更新对应视频的评论数量
|
||||||
@ -780,7 +781,9 @@ class _AttentionModuleState extends State<AttentionModule> {
|
|||||||
videoList[index]['commentsCounts'] = newCount;
|
videoList[index]['commentsCounts'] = newCount;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1291,15 +1294,16 @@ class _AttentionModuleState extends State<AttentionModule> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||||
Text(
|
Text(
|
||||||
'@${videoList[videoModuleController.videoPlayIndex.value]['nickname'] ?? '未知'}',
|
'@${videoList[videoModuleController.videoPlayIndex.value]['nickname'] ?? '未知'}',
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||||
) else
|
)
|
||||||
|
else
|
||||||
Text(
|
Text(
|
||||||
'@未知',
|
'@未知',
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||||
),
|
),
|
||||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||||
LayoutBuilder(
|
LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
||||||
@ -1350,8 +1354,9 @@ class _AttentionModuleState extends State<AttentionModule> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)else
|
)
|
||||||
SizedBox()
|
else
|
||||||
|
SizedBox()
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
|
|||||||
@ -772,7 +772,8 @@ class _FriendModuleState extends State<FriendModule> {
|
|||||||
),
|
),
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return CommentBottomSheet(
|
return SafeArea(
|
||||||
|
child: CommentBottomSheet(
|
||||||
videoId: videoId,
|
videoId: videoId,
|
||||||
onCommentCountChanged: (newCount) {
|
onCommentCountChanged: (newCount) {
|
||||||
// 更新对应视频的评论数量
|
// 更新对应视频的评论数量
|
||||||
@ -781,7 +782,9 @@ class _FriendModuleState extends State<FriendModule> {
|
|||||||
videoList[index]['commentsCounts'] = newCount;
|
videoList[index]['commentsCounts'] = newCount;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1305,9 +1308,9 @@ class _FriendModuleState extends State<FriendModule> {
|
|||||||
'@未知',
|
'@未知',
|
||||||
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
style: const TextStyle(color: Colors.white, fontSize: 16.0),
|
||||||
),
|
),
|
||||||
// 对下面的 LayoutBuilder 也需要同样的检查
|
// 对下面的 LayoutBuilder 也需要同样的检查
|
||||||
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
if (videoModuleController.videoPlayIndex.value < videoList.length)
|
||||||
LayoutBuilder(
|
LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
final text = videoList[videoModuleController.videoPlayIndex.value]['title'] ?? '未知';
|
||||||
final span = TextSpan(
|
final span = TextSpan(
|
||||||
@ -1357,7 +1360,8 @@ class _FriendModuleState extends State<FriendModule> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)else
|
)
|
||||||
|
else
|
||||||
SizedBox()
|
SizedBox()
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user