CustomRenderable class

A custom renderable that uses a callback for rendering

Inheritance

Constructors

CustomRenderable({required void onRender(Canvas canvas, Size size), Rect? getBoundsCallback()?, Offset position = Offset.zero, double rotation = 0.0, double scale = 1.0, int layer = 0, int zOrder = 0, bool visible = true, double opacity = 1.0})
Create a custom renderable

Properties

getBoundsCallback Rect? Function()?
Optional bounds
final
hashCode int
The hash code for this object.
no setterinherited
layer int
Layer index for rendering order (lower layers render first)
getter/setter pairinherited
onRender → void Function(Canvas canvas, Size size)
Custom render callback
final
opacity double
Opacity (0.0 to 1.0)
getter/setter pairinherited
position Offset
Position in world space
getter/setter pairinherited
rotation double
Rotation in radians
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Scale factor
getter/setter pairinherited
tint Color?
Tint color
getter/setter pairinherited
visible bool
Visibility flag
getter/setter pairinherited
zOrder int
Z-order within the layer
getter/setter pairinherited

Methods

applyTransform(Canvas canvas) → void
Apply transform to canvas
inherited
getBounds() Rect?
Get the bounding box of this renderable
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, Size canvasSize) → void
Render this object
override
restoreTransform(Canvas canvas) → void
Restore canvas state
inherited
toString() String
A string representation of this object.
inherited

Operators

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