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("李二"),//可以在图片上添加文字等等
),

    原文作者:ASH救世主
    原文地址: https://blog.csdn.net/qq_32319999/article/details/80352069
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞