shadow method

Widget shadow(
  1. List<BoxShadow> shadows
)

Applies box shadows.

Wraps this widget in a DecoratedBox with a BoxDecoration containing the provided shadows.

Ordering tip: Call .shadow() after .rounded() so the shadow is painted outside the clipped area:

widget.rounded(TwRadii.lg).shadow(TwShadows.md) // correct
widget.shadow(TwShadows.md).rounded(TwRadii.lg) // wrong: shadow clipped

Implementation

Widget shadow(List<BoxShadow> shadows) => DecoratedBox(
      decoration: BoxDecoration(boxShadow: shadows),
      child: this,
    );