opt: video pic showing

This commit is contained in:
bggRGjQaUbCoE
2024-09-03 18:05:42 +08:00
parent e4d97ace6a
commit f576e17b79
6 changed files with 56 additions and 31 deletions

View File

@@ -40,7 +40,7 @@ class NetworkImgLayer extends StatelessWidget {
Widget build(BuildContext context) {
final int defaultImgQuality = GlobalData().imgQuality;
final String imageUrl =
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
'${src?.startsWith('//') == true ? 'https:$src' : src}@${quality ?? defaultImgQuality}q.webp';
int? memCacheWidth, memCacheHeight;
if (width > height || (origAspectRatio != null && origAspectRatio! > 1)) {
@@ -66,7 +66,8 @@ class NetworkImgLayer extends StatelessWidget {
child: CachedNetworkImage(
imageUrl: imageUrl,
width: width,
height: ignoreHeight == null || ignoreHeight == false? height:null,
height:
ignoreHeight == null || ignoreHeight == false ? height : null,
memCacheWidth: memCacheWidth,
memCacheHeight: memCacheHeight,
fit: BoxFit.cover,