当前位置:网站首页>Shutter cachednetworkimage fillet
Shutter cachednetworkimage fillet
2022-07-26 12:55:00 【Flutter Mengxin College】
class CircularCachedNetworkImage extends StatelessWidget {
CircularCachedNetworkImage(this.url,
{
this.width,
this.height,
this.radius,
this.fit,
this.imageSize,
});
String url;
final double width;
final double height;
final BoxFit fit;
final double radius;
final double imageSize;
@override
Widget build(BuildContext context) {
// String urlStr = StringUtil.supportCdnUrl(url: url,width: width) ??'';
return ClipRRect(
borderRadius: BorderRadius.circular(radius??4),
child: CachedNetworkImage(
imageUrl: url??'',
imageBuilder: (context, imageProvider) => Container(
height: height,
width: width,
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: fit??BoxFit.cover,
),
),
),
placeholder: (context, url) => Container(
height: height,
width: width,
color:Global.kTheme.bg1,
child: Center(
child: loadImage("bk-logo2",width: imageSize??43,color: Global.kTheme.bg3),
),),
errorWidget: (context, url, error) => Container(
height: height,
width: width,
color:Global.kTheme.bg1,
child: Center(
child: loadImage("bk-logo2",width:imageSize??43,color: Global.kTheme.bg3),
),),
));
}
}
边栏推荐
- 【TypeScript】TypeScript常用类型(下篇)
- 如何组装一个注册中心?
- Code error reporting and problem solving experience II: test error reporting in yolov5
- Detailed interpretation of hole convolution (input and output size analysis)
- How to optimize a large number of if else [email protected] Detailed explanation of valib
- Ds-24c/dc220v time relay
- Vs code set the method of ctrl+s saving and automatic formatting
- 今日睡眠质量记录75分
- How to view encrypted information in text form
- 代码报错解决问题经验之二:YOLOv5中的test报错
猜你喜欢

Backtracking - 46. Full arrangement

Ue5 official case Lyra full feature explanation 7. resource management

C语言文件知识点

LCD笔记(7)LCD驱动程序框架_配置时钟

Sword finger offer 24. reverse the linked list
![[map] universal map usage & two ways of fuzzy query](/img/ec/e95e4057af2b9133786bb4103d2daa.png)
[map] universal map usage & two ways of fuzzy query

After being fined "paid leave" for one month, Google fired him who "loves" AI

笔记。。。。

0 basic programming resources (collect first ~ read slowly ~)

什么是回调函数,对于“回”字的理解
随机推荐
若有声明”int x=5,y=1;”,则表达式x<y?x++:y++的结果是:
What is a callback function? Understanding of the word "back"
0 basic programming resources (collect first ~ read slowly ~)
Azure synapse analytics Performance Optimization Guide (2) -- optimize performance using materialized views (Part 1)
The database consists of stored procedures and functions
Kubernetes----Kubernetes常用插件简介
什么是回调函数,对于“回”字的理解
Transactional transaction propagation behavior?
Shell变量和引用
Kubernetes ---- life cycle introduction of PV and PVC
Kubernetes---- installing and deploying NFS servers
Industry case | how does the index help the sustainable development of Inclusive Finance in the banking industry
【TypeScript】TypeScript常用类型(下篇)
LCD笔记(7)LCD驱动程序框架_配置时钟
Food safety | is self-made food purchased online healthy food? Don't fall into these misunderstandings
mqtt send receive
Does anyone know where the retract of flinksql can be specified? Only api code settings can be seen in online materials
How to optimize a large number of if else [email protected] Detailed explanation of valib
如何组装一个注册中心?
实体映射最强工具类:MapStruct真香