BoxShadowUtils extension

👓 Box Shadow Utilities

Extension on BoxShadow for manipulation of shadows by copyWith.

Consider the operator overrides for even simpler syntax.

  • 📋 copyWith Copy With replacement properties
  • * "Multiply" this BoxShadow by a Color
  • * "Multiply" this blurRadius by a num
  • + "Add" to this spreadRadius a double smudgeSpread
  • - "Subtract" from this spreadRadius a double squishSpread
  • 📏 % "Modulate" this offset by Offset offsetScale
on

Methods

copyWith({Color? color, Offset? offset, double? blurRadius, double? spreadRadius}) BoxShadow
📋 Return a BoxShadow with fields that mirror this except for the parameters passed with this method.

Operators

operator %(Offset offsetScale) BoxShadow
📏 "Modulate" this BoxShadow by offsetScale.
operator *(dynamic operation) BoxShadow
❌ "Multiply" this BoxShadow by a Color or double.
operator +(double spreadSmudge) BoxShadow
➕ "Add" a double to this BoxShadow, returning a new BoxShadow with smudged, or increased, BoxShadow.spreadRadius.
operator -(double spreadSquish) BoxShadow
➖ "Subtract" a double from this BoxShadow, returning a new BoxShadow with squished, or decreased, BoxShadow.spreadRadius.