boxShadow method

Widget boxShadow({
  1. Key? key,
  2. Color color = const Color(0xFF000000),
  3. Offset offset = Offset.zero,
  4. double blurRadius = 0.0,
  5. double spreadRadius = 0.0,
})

阴影

Implementation

Widget boxShadow({
  Key? key,
  Color color = const Color(0xFF000000),
  Offset offset = Offset.zero,
  double blurRadius = 0.0,
  double spreadRadius = 0.0,
}) {
  BoxDecoration decoration = BoxDecoration(
    boxShadow: [
      BoxShadow(
        color: color,
        blurRadius: blurRadius,
        spreadRadius: spreadRadius,
        offset: offset,
      ),
    ],
  );
  return DecoratedBox(
    key: key,
    child: this,
    decoration: decoration,
  );
}