Merge branch 'fix'

This commit is contained in:
guozhigq
2024-05-05 10:09:49 +08:00
2 changed files with 10 additions and 5 deletions

View File

@ -34,6 +34,9 @@ class NetworkImgLayer extends StatelessWidget {
@override
Widget build(BuildContext context) {
final int defaultImgQuality = GlobalData().imgQuality;
if (src == '' || src == null) {
return placeholder(context);
}
final String imageUrl =
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
int? memCacheWidth, memCacheHeight;

View File

@ -323,11 +323,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
children: [
GestureDetector(
onTap: handlePlay,
child: Image.network(
vdCtr.videoItem['pic'],
width: Get.width,
height: videoHeight,
fit: BoxFit.cover, // 适应方式根据需要调整
child: Obx(
() => NetworkImgLayer(
src: vdCtr.cover.value,
width: Get.width,
height: videoHeight,
type: 'emote',
),
),
),
buildCustomAppBar(),