shadow abstract method

void shadow({
  1. Iterable<Offset>? includes,
  2. Iterable<Offset>? excludes,
  3. Color? color,
  4. double? elevation,
  5. bool? transparentOccluder,
})

Indicates that a shadow is expected next.

The next shadow is examined. Any arguments that are passed to this method are compared to the actual Canvas.drawShadow call's paint argument, and any mismatches result in failure.

In tests, shadows from framework features such as BoxShadow or Material are disabled by default, and thus this predicate would not match. The debugDisableShadows flag controls this.

To introspect the Path object (as it stands after the painting has completed), the includes and excludes arguments can be provided to specify points that should be considered inside or outside the path (respectively).

If no call to Canvas.drawShadow was made, then this results in failure.

Any calls made between the last matched call (if any) and the Canvas.drawShadow call are ignored.

Implementation

void shadow({ Iterable<Offset>? includes, Iterable<Offset>? excludes, Color? color, double? elevation, bool? transparentOccluder });