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