withShadow method

Container withShadow({
  1. Color shadowColor = Colors.grey,
  2. double blurRadius = 20.0,
  3. double spreadRadius = 1.0,
  4. Offset offset = const Offset(10.0, 10.0),
})

A shadow cast by a box

shadowColor

Implementation

Container withShadow(
        {Color shadowColor = Colors.grey,
        double blurRadius = 20.0,
        double spreadRadius = 1.0,
        Offset offset = const Offset(10.0, 10.0)}) =>
    Container(
      decoration: BoxDecoration(
        boxShadow: [
          BoxShadow(
              color: shadowColor,
              blurRadius: blurRadius,
              spreadRadius: spreadRadius,
              offset: offset),
        ],
      ),
      child: this,
    );