From 54efb9162192a2e6f3875adda696bdc530506269 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 9 Dec 2024 22:41:35 +0800 Subject: [PATCH] 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 =