withShadow method

Widget withShadow({
  1. Color color = Colors.black,
  2. double blurRadius = 10.0,
  3. Offset offset = const Offset(2, 2),
})

Implementation

Widget withShadow({
  Color color = Colors.black,
  double blurRadius = 10.0,
  Offset offset = const Offset(2, 2),
}) {
  return Container(
    decoration: BoxDecoration(
      boxShadow: [
        BoxShadow(
          color: color,
          blurRadius: blurRadius,
          offset: offset,
        ),
      ],
    ),
    child: this,
  );
}