Shadow constructor

const Shadow({Color color: const Color(_kColorDefault), Offset offset: Offset.zero, double blurRadius: 0.0 })

Construct a shadow.

The default shadow is a black shadow with zero offset and zero blur. Default shadows should be completely covered by the casting element, and not be visible.

Transparency should be adjusted through the color alpha.

Shadow order matters due to compositing multiple translucent objects not being commutative.

Implementation

const Shadow({
  this.color = const Color(_kColorDefault),
  this.offset = Offset.zero,
  this.blurRadius = 0.0,
}) : assert(color != null, 'Text shadow color was null.'),
     assert(offset != null, 'Text shadow offset was null.'),
     assert(blurRadius >= 0.0, 'Text shadow blur radius should be non-negative.');