path abstract method

void path({
  1. Iterable<Offset>? includes,
  2. Iterable<Offset>? excludes,
  3. Color? color,
  4. double? strokeWidth,
  5. bool? hasMaskFilter,
  6. PaintingStyle? style,
})

Indicates that a path is expected next.

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

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.drawPath was made, then this results in failure.

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

The Paint-related arguments (color, strokeWidth, hasMaskFilter, style) are compared against the state of the Paint object after the painting has completed, not at the time of the call. If the same Paint object is reused multiple times, then this may not match the actual arguments as they were seen by the method.

Implementation

void path({ Iterable<Offset>? includes, Iterable<Offset>? excludes, Color? color, double? strokeWidth, bool? hasMaskFilter, PaintingStyle? style });