import 'package:flutter/material.dart'; Decoration card({circular = 10.0}) => BoxDecoration( color: Colors.white, // 底色 borderRadius: new BorderRadius.all(Radius.circular(circular)), // 也可控件一边圆角大小 boxShadow: [BoxShadow(offset: Offset(0.0, 0), blurRadius: 7, spreadRadius: 0, color: Color.fromRGBO(0, 0, 0, 0.07))]); Decoration circular({circular = 10.0}) => BoxDecoration(borderRadius: BorderRadius.circular(circular), color: Colors.white); Decoration shadowTop() => BoxDecoration( color: Colors.white, // 底色 boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.04), offset: Offset(0.0, -3.0), //阴影xy轴偏移量 blurRadius: 5.0, //阴影模糊程度 spreadRadius: .0//阴影扩散程度 )]);