line abstract method
Indicates that a line is expected next.
The next line is examined. Any arguments that are passed to this method
are compared to the actual Canvas.drawLine call's p1
, p2
, and
paint
arguments, and any mismatches result in failure.
If no call to Canvas.drawLine was made, then this results in failure.
Any calls made between the last matched call (if any) and the Canvas.drawLine 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 line({ Offset? p1, Offset? p2, Color? color, double? strokeWidth, bool? hasMaskFilter, PaintingStyle? style });