fix: reply snapshot data null
This commit is contained in:
@ -196,7 +196,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
future: _futureBuilderFuture,
|
future: _futureBuilderFuture,
|
||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
var data = snapshot.data;
|
Map? data = snapshot.data;
|
||||||
if (_videoReplyController.replyList.isNotEmpty ||
|
if (_videoReplyController.replyList.isNotEmpty ||
|
||||||
(data != null && data['status'])) {
|
(data != null && data['status'])) {
|
||||||
// 请求成功
|
// 请求成功
|
||||||
@ -258,7 +258,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
} else {
|
} else {
|
||||||
// 请求错误
|
// 请求错误
|
||||||
return HttpError(
|
return HttpError(
|
||||||
errMsg: data['msg'],
|
errMsg: data?['msg'] ?? '请求异常',
|
||||||
fn: () {
|
fn: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_futureBuilderFuture =
|
_futureBuilderFuture =
|
||||||
|
Reference in New Issue
Block a user