|
|
|
@ -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( |
|
|
|
|