fix: 合集cover null

This commit is contained in:
guozhigq
2024-04-27 22:17:10 +08:00
parent d61068cd3f
commit aff39c291d

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
onTap: () { ? ListTile(
SmartDialog.showToast('切换至「$title'); onTap: () {
changeFucCall.call(episode, index); SmartDialog.showToast('切换至「$title');
}, changeFucCall.call(episode, index);
child: Padding( },
padding: const EdgeInsets.only(left: 14, right: 14, top: 8, bottom: 8), dense: false,
child: isFullScreen leading: isCurrentIndex
? Text( ? Image.asset(
title, 'assets/images/live.gif',
maxLines: 1, color: primary,
height: 12,
)
: null,
title: Text(title,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: isCurrentIndex ? primary : onSurface, color: isCurrentIndex ? primary : onSurface,
), )))
) : InkWell(
: Row( onTap: () {
SmartDialog.showToast('切换至「$title');
changeFucCall.call(episode, index);
},
child: Padding(
padding:
const EdgeInsets.only(left: 14, right: 14, top: 8, bottom: 8),
child: 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(
@ -77,8 +89,8 @@ class EpisodeBottomSheet {
), ),
], ],
), ),
), ),
); );
} }
Widget buildTitle() { Widget buildTitle() {