paragraph abstract method

void paragraph({
  1. Paragraph? paragraph,
  2. dynamic offset,
})

Indicates that a paragraph is expected next.

Calls are skipped until a call to Canvas.drawParagraph is found. Any arguments that are passed to this method are compared to the actual Canvas.drawParagraph call's argument, and any mismatches result in failure.

The offset argument can be either an Offset or a Matcher. If it is an Offset then the actual value must match the expected offset precisely. If it is a Matcher then the comparison is made according to the semantics of the Matcher. For example, within can be used to assert that the actual offset is within a given distance from the expected offset.

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

Implementation

void paragraph({ ui.Paragraph? paragraph, dynamic offset });