fix: 番剧跳转前查询信息失败时模态窗未关闭

This commit is contained in:
orz12
2024-06-01 11:25:05 +08:00
parent eecb381c7c
commit a376232ccf

View File

@@ -43,19 +43,18 @@ class VideoCardV extends StatelessWidget {
int epId = videoItem.param; int epId = videoItem.param;
SmartDialog.showLoading(msg: '资源获取中'); SmartDialog.showLoading(msg: '资源获取中');
var result = await SearchHttp.bangumiInfo(seasonId: null, epId: epId); var result = await SearchHttp.bangumiInfo(seasonId: null, epId: epId);
SmartDialog.dismiss();
if (result['status']) { if (result['status']) {
var bangumiDetail = result['data']; var bangumiDetail = result['data'];
int cid = bangumiDetail.episodes!.first.cid; int cid = bangumiDetail.episodes!.first.cid;
String bvid = IdUtils.av2bv(bangumiDetail.episodes!.first.aid); String bvid = IdUtils.av2bv(bangumiDetail.episodes!.first.aid);
SmartDialog.dismiss().then( Get.toNamed(
(value) => Get.toNamed( '/video?bvid=$bvid&cid=$cid&epId=$epId',
'/video?bvid=$bvid&cid=$cid&epId=$epId', arguments: {
arguments: { 'pic': videoItem.pic,
'pic': videoItem.pic, 'heroTag': heroTag,
'heroTag': heroTag, 'videoType': SearchType.media_bangumi,
'videoType': SearchType.media_bangumi, },
},
),
); );
} else { } else {
SmartDialog.showToast(result['msg']); SmartDialog.showToast(result['msg']);
@@ -281,8 +280,7 @@ class VideoContent extends StatelessWidget {
), ),
), ),
), ),
if (videoItem.goto == 'av') if (videoItem.goto == 'av') const SizedBox(width: 24)
const SizedBox(width: 24)
], ],
), ),
], ],