fix: 合集cover null

This commit is contained in:
guozhigq
2024-04-27 22:17:10 +08:00
parent 59086dd84e
commit 21fe663add

View File

@ -45,25 +45,37 @@ class EpisodeBottomSheet {
title = '${episode.title}${episode.longTitle!}'; title = '${episode.title}${episode.longTitle!}';
break; break;
} }
return InkWell( return isFullScreen || episode?.cover == null
? ListTile(
onTap: () {
SmartDialog.showToast('切换至「$title');
changeFucCall.call(episode, index);
},
dense: false,
leading: isCurrentIndex
? Image.asset(
'assets/images/live.gif',
color: primary,
height: 12,
)
: null,
title: Text(title,
style: TextStyle(
fontSize: 14,
color: isCurrentIndex ? primary : onSurface,
)))
: InkWell(
onTap: () { onTap: () {
SmartDialog.showToast('切换至「$title'); SmartDialog.showToast('切换至「$title');
changeFucCall.call(episode, index); changeFucCall.call(episode, index);
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 14, right: 14, top: 8, bottom: 8), padding:
child: isFullScreen const EdgeInsets.only(left: 14, right: 14, top: 8, bottom: 8),
? Text( child: Row(
title,
maxLines: 1,
style: TextStyle(
fontSize: 14,
color: isCurrentIndex ? primary : onSurface,
),
)
: Row(
children: [ children: [
NetworkImgLayer(width: 130, height: 75, src: episode.cover), NetworkImgLayer(
width: 130, height: 75, src: episode?.cover ?? ''),
const SizedBox(width: 10), const SizedBox(width: 10),
Expanded( Expanded(
child: Text( child: Text(