基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
disable network image pre resize to fix flicking issue
Prediditcdf5fdecc5dc
diff --git a/lib/bean/card/network_img_layer.dart b/lib/bean/card/network_img_layer.dartindex 9c54c4c7..6fa8350b 100644--- a/lib/bean/card/network_img_layer.dart+++ b/lib/bean/card/network_img_layer.dart@@ -31,31 +31,33 @@ class NetworkImgLayer extends StatelessWidget {@overrideWidget build(BuildContext context) {final String imageUrl = src ?? '';- int? memCacheWidth, memCacheHeight;- double aspectRatio = (width / height).toDouble();- void setMemCacheSizes() {- if (aspectRatio > 1) {- memCacheHeight = height.cacheSize(context);- } else if (aspectRatio < 1) {- memCacheWidth = width.cacheSize(context);- } else {- if (origAspectRatio != null && origAspectRatio! > 1) {- memCacheWidth = width.cacheSize(context);- } else if (origAspectRatio != null && origAspectRatio! < 1) {- memCacheHeight = height.cacheSize(context);- } else {- memCacheWidth = width.cacheSize(context);- memCacheHeight = height.cacheSize(context);- }- }- }+ //// Deprecated due to the flickering issue in the first frame of info page+ // int? memCacheWidth, memCacheHeight;+ // double aspectRatio = (width / height).toDouble();- setMemCacheSizes();+ // void setMemCacheSizes() {+ // if (aspectRatio > 1) {+ // memCacheHeight = height.cacheSize(context);+ // } else if (aspectRatio < 1) {+ // memCacheWidth = width.cacheSize(context);+ // } else {+ // if (origAspectRatio != null && origAspectRatio! > 1) {+ // memCacheWidth = width.cacheSize(context);+ // } else if (origAspectRatio != null && origAspectRatio! < 1) {+ // memCacheHeight = height.cacheSize(context);+ // } else {+ // memCacheWidth = width.cacheSize(context);+ // memCacheHeight = height.cacheSize(context);+ // }+ // }+ // }- if (memCacheWidth == null && memCacheHeight == null) {- memCacheWidth = width.toInt();- }+ // setMemCacheSizes();++ // if (memCacheWidth == null && memCacheHeight == null) {+ // memCacheWidth = width.toInt();+ // }return src != '' && src != null? ClipRRect(@@ -71,8 +73,8 @@ class NetworkImgLayer extends StatelessWidget {imageUrl: imageUrl,width: width,height: height,- memCacheWidth: memCacheWidth,- memCacheHeight: memCacheHeight,+ // memCacheWidth: memCacheWidth,+ // memCacheHeight: memCacheHeight,fit: BoxFit.cover,fadeOutDuration:fadeOutDuration ?? const Duration(milliseconds: 120),