fix: 楼中楼评论请求异常

This commit is contained in:
guozhigq
2024-04-10 23:34:59 +08:00
parent ab09e554b3
commit cd94ddbda4

View File

@ -140,8 +140,8 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
future: _futureBuilderFuture,
builder: (BuildContext context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
final Map data = snapshot.data as Map;
if (data['status']) {
Map? data = snapshot.data;
if (data != null && data['status']) {
// 请求成功
return Obx(
() => SliverList(
@ -199,7 +199,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
} else {
// 请求错误
return HttpError(
errMsg: data['msg'],
errMsg: data?['msg'] ?? '请求错误',
fn: () => setState(() {}),
);
}