From 6da1ad39afc451e8e8b00fbe0e515da2881b98fe Mon Sep 17 00:00:00 2001 From: fmk Date: Wed, 4 Aug 2021 11:35:59 +0800 Subject: [PATCH] image --- lib/union/store_details_page.dart | 12 +++++++++--- lib/view_widget/custom_image.dart | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/union/store_details_page.dart b/lib/union/store_details_page.dart index d338e49e..8b6cbf22 100644 --- a/lib/union/store_details_page.dart +++ b/lib/union/store_details_page.dart @@ -228,9 +228,15 @@ class _StoreDetailsPage extends State { assetUriMatcher(): assetImageRender(), networkSourceMatcher(extension: "svg"): svgNetworkImageRender(), - networkSourceMatcher(): networkImageRender(loadingWidget: () { - return Container(); - }), + networkSourceMatcher(): networkImageRender( + loadingWidget: () { + return Container(); + }, + mapUrl: (url) { + print("objectUrl: $url"); + return "$url?imageMogr2/format/webp/blur/1x0/quality/75"; + } + ), }, customRender: { "video" : (context, parsedChild, attributes, element) { diff --git a/lib/view_widget/custom_image.dart b/lib/view_widget/custom_image.dart index d3e3bf80..7420e79c 100644 --- a/lib/view_widget/custom_image.dart +++ b/lib/view_widget/custom_image.dart @@ -28,7 +28,7 @@ class MImage extends StatelessWidget { var clipRRect = ClipRRect( borderRadius: radius, child: CachedNetworkImage( - imageUrl: "$src?imageMogr2/thumbnail/640x640/format/webp/blur/1x0/quality/75", + imageUrl: "$src?imageMogr2/format/webp/blur/1x0/quality/75", cacheManager: DefaultCacheManager(), fadeInDuration: Duration(milliseconds: 300), fadeOutDuration: Duration(milliseconds: 300),