canvas_test library

Classes

CanvasCommand
This class encapsulates a single command that was issued to a MockCanvas. Most methods of MockCanvas will use a dedicated class derived from CanvasCommand to store all the arguments and then match them against the expected values.
ClipRectCommand
canvas.clipRect()
ImageCommand
canvas.drawImage()
LineCommand
canvas.drawLine()
MockCanvas
MockCanvas is a utility class for writing tests. It supports the same API as the regular Canvas class from dart:ui (in theory; any missing commands can be added as the need arises). In addition, this class is also a Matcher, allowing it to be used in expect() calls:
ParagraphCommand
canvas.drawParagraph()
RectCommand
canvas.drawRect()
RRectCommand
canvas.drawRRect()
TransformCommand
This canvas command describes either a single or multiple method calls canvas.translate(), canvas.rotate(), canvas.scale(), or canvas.transform().

Enums

AssertionMode
Defines how MockCanvas#matches behaves.