fix: 二级评论点击报错、一些样式修改
This commit is contained in:
@ -8,17 +8,19 @@ class CustomToast extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
margin:
|
margin:
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 20),
|
EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 30),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.primaryContainer,
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
),
|
),
|
||||||
child: Text(msg,
|
child: Text(
|
||||||
style: Theme.of(context)
|
msg,
|
||||||
.textTheme
|
style: TextStyle(
|
||||||
.labelMedium!
|
fontSize: 13,
|
||||||
.copyWith(color: Theme.of(context).colorScheme.primary)),
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,8 @@ class NetworkImgLayer extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget placeholder(context) {
|
Widget placeholder(context) {
|
||||||
return SizedBox(
|
return Container(
|
||||||
|
color: Theme.of(context).colorScheme.onInverseSurface.withOpacity(0.6),
|
||||||
width: width ?? double.infinity,
|
width: width ?? double.infinity,
|
||||||
height: height ?? double.infinity,
|
height: height ?? double.infinity,
|
||||||
child: Center(
|
child: Center(
|
||||||
|
@ -148,7 +148,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
? Column(
|
? Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
InkWell(
|
||||||
onTap: () => showIntroDetail(),
|
onTap: () => showIntroDetail(),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -178,23 +178,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
return t.highlightColor.withOpacity(0.2);
|
return t.highlightColor.withOpacity(0.2);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () => showIntroDetail(),
|
||||||
showBottomSheet(
|
|
||||||
context: context,
|
|
||||||
enableDrag: true,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return IntroDetail(
|
|
||||||
videoDetail: widget.videoDetail!);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
icon: const Icon(Icons.more_horiz),
|
icon: const Icon(Icons.more_horiz),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
InkWell(
|
||||||
onTap: () => showIntroDetail(),
|
onTap: () => showIntroDetail(),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -55,7 +55,7 @@ class IntroDetail extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 4),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
StatView(
|
StatView(
|
||||||
@ -94,6 +94,7 @@ class IntroDetail extends StatelessWidget {
|
|||||||
Text(videoDetail!.bvid!),
|
Text(videoDetail!.bvid!),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text.rich(
|
Text.rich(
|
||||||
|
style: const TextStyle(height: 1.4),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
buildContent(context, videoDetail!),
|
buildContent(context, videoDetail!),
|
||||||
|
@ -100,11 +100,13 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
void replyReply(replyItem) {
|
void replyReply(replyItem) {
|
||||||
VideoDetailController videoDetailCtr =
|
VideoDetailController videoDetailCtr =
|
||||||
Get.find<VideoDetailController>(tag: Get.arguments['heroTag']);
|
Get.find<VideoDetailController>(tag: Get.arguments['heroTag']);
|
||||||
|
if (replyItem != null) {
|
||||||
videoDetailCtr.oid = replyItem.oid;
|
videoDetailCtr.oid = replyItem.oid;
|
||||||
videoDetailCtr.fRpid = replyItem.rpid!;
|
videoDetailCtr.fRpid = replyItem.rpid!;
|
||||||
videoDetailCtr.firstFloor = replyItem;
|
videoDetailCtr.firstFloor = replyItem;
|
||||||
videoDetailCtr.showReplyReplyPanel();
|
videoDetailCtr.showReplyReplyPanel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
@ -34,7 +34,12 @@ class ReplyItem extends StatelessWidget {
|
|||||||
return Material(
|
return Material(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
// 点击整个评论区 评论详情/回复
|
// 点击整个评论区 评论详情/回复
|
||||||
onTap: () => replyReply!(replyItem),
|
onTap: () {
|
||||||
|
feedBack();
|
||||||
|
if (replyReply != null) {
|
||||||
|
replyReply!(replyItem);
|
||||||
|
}
|
||||||
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(12, 4, 8, 2),
|
padding: const EdgeInsets.fromLTRB(12, 4, 8, 2),
|
||||||
child: content(context),
|
child: content(context),
|
||||||
|
@ -65,6 +65,8 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
|||||||
_futureBuilderFuture = _videoReplyReplyController.queryReplyList();
|
_futureBuilderFuture = _videoReplyReplyController.queryReplyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void replyReply(replyItem) {}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
// _videoReplyReplyController.scrollController.dispose();
|
// _videoReplyReplyController.scrollController.dispose();
|
||||||
@ -122,6 +124,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
|||||||
_videoReplyReplyController.replyList.add(replyItem);
|
_videoReplyReplyController.replyList.add(replyItem);
|
||||||
},
|
},
|
||||||
replyType: widget.replyType,
|
replyType: widget.replyType,
|
||||||
|
replyReply: (replyItem) => replyReply(replyItem),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
|
Reference in New Issue
Block a user