shadow method

VContainer shadow({
  1. Color color = Colors.black26,
  2. double blur = 4,
  3. Offset offset = const Offset(2, 2),
  4. double spread = 0,
})

Adds a box shadow to the container.

Implementation

VContainer shadow({
  Color color = Colors.black26,
  double blur = 4,
  Offset offset = const Offset(2, 2),
  double spread = 0,
}) => VContainer(
  child: child,
  alignment: alignment,
  padding: padding,
  margin: margin,
  width: _width,
  height: _height,
  decoration:
      (decoration?.copyWith(
        boxShadow: [
          BoxShadow(
            color: color,
            blurRadius: blur,
            offset: offset,
            spreadRadius: spread,
          ),
        ],
      )) ??
      BoxDecoration(
        boxShadow: [
          BoxShadow(
            color: color,
            blurRadius: blur,
            offset: offset,
            spreadRadius: spread,
          ),
        ],
      ),
);