flutter 显示圆形头像

第一种:

new ClipOval(
  child: new FadeInImage.assetNetwork(
    placeholder: "images/normal_user_icon.webp",//预览图
    fit: BoxFit.fitWidth,
    image:"https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=3463668003,3398677327&fm=58",
    width: 60.0,
    height: 60.0,
  ),
),

第二种:

new CircleAvatar(
    backgroundImage: new NetworkImage("https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=3463668003,3398677327&fm=58"),
    child: new Text("李二"),//可以在图片上添加文字等等
),

猜你喜欢

转载自blog.csdn.net/qq_32319999/article/details/80352069