ShapeDrawable class Null safety

Abstract class representing a drawable of a shape.

Inheritance
Implementers

Constructors

ShapeDrawable({Paint? paint, required Offset position, double rotationAngle = 0, double scale = 1, Set<ObjectDrawableAssist> assists = const <ObjectDrawableAssist>{}, Map<ObjectDrawableAssist, Paint> assistPaints = const <ObjectDrawableAssist, Paint>{}, bool locked = false, bool hidden = false})
Default constructor for ObjectDrawable.

Properties

assistPaints Map<ObjectDrawableAssist, Paint>
The paint to be used for each assist type.
finalinherited
assists Set<ObjectDrawableAssist>
The current assist lines the object has.
finalinherited
hashCode int
The hash code for this object.
read-onlyinherited
hidden bool
Whether the drawable is hidden or not.
finalinherited
isHidden bool
read-onlyinherited
isNotHidden bool
read-onlyinherited
locked bool
Defines if the object drawable is locked or not. If it is locked, it won't be movable, scalable or re-sizable using the UI.
finalinherited
min_scale double
read-onlyinherited
paint Paint
The paint to be used for the shape drawable.
read / write
position Offset
The location of the object to be painted.
finalinherited
rotationAngle double
The rotation of the object to be painted in radians.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scale double
The scale of the object to be painted.
finalinherited

Methods

copyWith({bool? hidden, Set<ObjectDrawableAssist>? assists, Offset? position, double? rotation, double? scale, Paint? paint, bool? locked}) ShapeDrawable
Creates a copy of this but with the given fields replaced with the new values.
override
draw(Canvas canvas, Size size) → void
Draws the object on the provided canvas of size size.
inherited
drawAssists(Canvas canvas, Size size) → void
Draws any assist lines that the object has on canvas with size.
inherited
drawObject(Canvas canvas, Size size) → void
Abstract method to draw the object.
inherited
getSize({double minWidth = 0.0, double maxWidth = double.infinity}) Size
Abstract method to get the size of the rendered object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

defaultPaint Paint
Default value for paint.
final