From 76db8de04804b9a429683a30ce449790f4348a39 Mon Sep 17 00:00:00 2001 From: fmk Date: Thu, 12 Aug 2021 19:14:06 +0800 Subject: [PATCH] UI --- lib/view_widget/custom_image.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart index 87c91061..11afd9cb 100644 --- a/lib/view_widget/custom_image.dart +++ b/lib/view_widget/custom_image.dart @@ -13,6 +13,8 @@ class MImage extends StatelessWidget { final BoxFit fit; final bool isCircle; + double scaleIndex = 2.5; + MImage( this.src, { this.errorSrc = "assets/image/default_2_1.png", @@ -30,8 +32,8 @@ class MImage extends StatelessWidget { Widget image = LayoutBuilder(builder: (context, constraints) { String imageUrl = ""; if (src != null && src != "") { - imageUrl = "$src?imageMogr2/thumbnail/${constraints.constrainWidth() * 2}" - "x${constraints.constrainHeight() * 2}/format/webp/blur/1x0/quality/75"; + imageUrl = "$src?imageMogr2/thumbnail/${constraints.constrainWidth() * scaleIndex}" + "x${constraints.constrainHeight() * scaleIndex}/format/webp/blur/1x0/quality/75"; } print("imageUrl: $imageUrl"); return CachedNetworkImage(