withShadow method

Widget withShadow({
  1. Color color = Colors.black,
  2. double blurRadius = 5.0,
  3. Offset offset = const Offset(0, 2),
  4. double spreadRadius = 0.0,
})

Adds a shadow to the widget

Implementation

Widget withShadow({
  Color color = Colors.black,
  double blurRadius = 5.0,
  Offset offset = const Offset(0, 2),
  double spreadRadius = 0.0,
}) {
  return Material(
    elevation: blurRadius,
    shadowColor: color,
    child: this,
  );
}