PaintingLayerData class

A class representing a layer with custom painting content.

PaintingLayerData is a subclass of Layer that allows you to display custom-painted content on a canvas. You can specify the painted item and its raw size, along with optional properties like offset, rotation, scale, and more.

Example usage:

PaintingLayerData(
  item: CustomPaintedItem(),
  rawSize: Size(200.0, 150.0),
  offset: Offset(50.0, 50.0),
  rotation: -30.0,
  scale: 1.5,
);
Inheritance

Constructors

PaintingLayerData({required PaintedModel item, required Size rawSize, required double opacity, Offset? offset, double? rotation, double? scale, String? id, bool? flipX, bool? flipY})
Creates an instance of PaintingLayerData.
PaintingLayerData.fromMap(Layer layer, Map map)
factory

Properties

flipX bool
Flags to control horizontal and vertical flipping.
getter/setter pairinherited
flipY bool
Flags to control horizontal and vertical flipping.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id String
A unique identifier for the layer.
getter/setter pairinherited
item PaintedModel
The custom-painted item to display on the layer.
final
key GlobalKey<State<StatefulWidget>>
getter/setter pairinherited
offset Offset
The position offset of the widget.
getter/setter pairinherited
opacity double
The opacity level of the drawing.
final
rawSize Size
The raw size of the painted item before applying scaling.
final
rotation double
The rotation and scale values of the widget.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
The rotation and scale values of the widget.
getter/setter pairinherited
size Size
Returns the size of the layer after applying the scaling factor.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map
Converts this transform object to a Map.
override
toString() String
A string representation of this object.
inherited

Operators

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