Paint class Null safety

A description of the style to use when drawing on a Canvas.

Most APIs on Canvas take a Paint object to describe the style to use for that operation.

Constructors

Paint()
Constructs an empty Paint object with all fields initialized to their defaults.

Properties

blendMode BlendMode
A blend mode to apply when a shape is drawn or a layer is composited.
read / write
color Color
The color to use when stroking or filling a shape.
read / write
colorFilter ColorFilter?
A color filter to apply when a shape is drawn or when a layer is composited.
read / write
filterQuality FilterQuality
Controls the performance vs quality trade-off to use when sampling bitmaps, as with an ImageShader, or when drawing images, as with Canvas.drawImage, Canvas.drawImageRect, Canvas.drawImageNine or Canvas.drawAtlas.
read / write
hashCode int
The hash code for this object.
read-onlyinherited
imageFilter ImageFilter?
The ImageFilter to use when drawing raster images.
read / write
invertColors bool
Whether the colors of the image are inverted when drawn.
read / write
isAntiAlias bool
Whether to apply anti-aliasing to lines and images drawn on the canvas.
read / write
maskFilter MaskFilter?
A mask filter (for example, a blur) to apply to a shape after it has been drawn but before it has been composited into the image.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shader Shader?
The shader to use when stroking or filling a shape.
read / write
strokeCap StrokeCap
The kind of finish to place on the end of lines drawn when style is set to PaintingStyle.stroke.
read / write
strokeJoin StrokeJoin
The kind of finish to place on the joins between segments.
read / write
strokeMiterLimit double
The limit for miters to be drawn on segments when the join is set to StrokeJoin.miter and the style is set to PaintingStyle.stroke. If this limit is exceeded, then a StrokeJoin.bevel join will be drawn instead. This may cause some 'popping' of the corners of a path if the angle between line segments is animated, as seen in the diagrams below.
read / write
strokeWidth double
How wide to make edges drawn when style is set to PaintingStyle.stroke. The width is given in logical pixels measured in the direction orthogonal to the direction of the path.
read / write
style PaintingStyle
Whether to paint inside shapes, the edges of shapes, or both.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

enableDithering bool
Whether to dither the output when drawing images.
read / write