From 54efb9162192a2e6f3875adda696bdc530506269 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 9 Dec 2024 22:41:35 +0800 Subject: [PATCH 1/2] fix: reply snapshot data null --- lib/pages/video/detail/reply/view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/video/detail/reply/view.dart b/lib/pages/video/detail/reply/view.dart index 28d36979..4dba2d8f 100644 --- a/lib/pages/video/detail/reply/view.dart +++ b/lib/pages/video/detail/reply/view.dart @@ -196,7 +196,7 @@ class _VideoReplyPanelState extends State future: _futureBuilderFuture, builder: (BuildContext context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { - var data = snapshot.data; + Map? data = snapshot.data; if (_videoReplyController.replyList.isNotEmpty || (data != null && data['status'])) { // 请求成功 @@ -258,7 +258,7 @@ class _VideoReplyPanelState extends State } else { // 请求错误 return HttpError( - errMsg: data['msg'], + errMsg: data?['msg'] ?? '请求异常', fn: () { setState(() { _futureBuilderFuture = From d55ffd8ec9b239cb4b3ce6478fe291d9df9b8c59 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 9 Dec 2024 22:42:26 +0800 Subject: [PATCH 2/2] fix: PBadge stack error --- lib/pages/video/detail/introduction/view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/video/detail/introduction/view.dart b/lib/pages/video/detail/introduction/view.dart index aac1d657..17116b8a 100644 --- a/lib/pages/video/detail/introduction/view.dart +++ b/lib/pages/video/detail/introduction/view.dart @@ -276,7 +276,7 @@ class _VideoInfoState extends State with TickerProviderStateMixin { WidgetSpan( child: Visibility( visible: widget.videoDetail!.copyright == 2, - child: const PBadge(text: '转载', type: 'color'), + child: const PBadge(text: '转载', type: 'color', stack: 'relative'), ), ), const TextSpan(text: ' '),