1、主要是 gradient 这个属性
Container(
width: 70,
height: 70,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(50)),
gradient: LinearGradient(colors: [
Color(0xff589429),
Color(0xff6FB12F),
Color(0xff8BD132),
Color(0xffA8EF32),
Color(0xffB7FF32),
])),
child: Container(),
);
2、效果图