我不能创建Flutter Flutter 中的头像,因为图像小工具的背景是动态的或视频的,所以我try 使用头像作为蓝图,然后用API中新的动态图像进行剪辑.
以下是我的代码:
Container(
height: height,
width: width,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.elliptical(width / 3 * 1.4, width / 3 * 1.6),
),
// color: mainColor,
image: decorationImage ??
DecorationImage(image: AssetImage(unknown_person))),
child: child ?? SizedBox(),
);
这是我想要的,没有黑色边框.
这就是我得到的: