Center(
child: AnimatedContainer(
duration: Duration(seconds: 1),
width: 200,
height: 100,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft, // 开始位置是哪里。
end: Alignment.bottomLeft, // 结束位置。
// stops: [0.5,0.9], // 边界范围。
colors: [Colors.blue[900], Colors.white]
),
borderRadius: BorderRadius.circular(100),
boxShadow: [
BoxShadow(
spreadRadius: 10, blurRadius: 25, color: Color(0xff333333))
], // 前面的是外边框,后面的是扩撒范围,然后是颜色。
// boxShadow:[BoxShadow(spreadRadius: 10, blurRadius: 25,color: Color(0xff9e8400) ),BoxShadow(spreadRadius: 3, blurRadius: 15,color: Colors.red ) ], // 前面的是外边框,后面的是扩撒范围,然后是颜色。
),
),
),