LayerModel class abstract

Base class for all layers in the poster.

Implementers

Constructors

LayerModel({String? id, required LayerType type, Offset position = const Offset(0, 0), double rotation = 0.0, double scale = 1.0, bool isSelected = false, double opacity = 1.0, bool isLocked = false, double? width, double? height})

Properties

hashCode → int
The hash code for this object.
no setterinherited
height ↔ double?
Explicit height of the layer (null means auto-size).
getter/setter pair
id ↔ String
Unique identifier for the layer.
getter/setter pair
isLocked ↔ bool
Whether the layer is locked (prevents editing).
getter/setter pair
isSelected ↔ bool
Whether the layer is currently selected.
getter/setter pair
opacity ↔ double
Opacity of the layer (0.0 to 1.0).
getter/setter pair
position ↔ Offset
The position of the layer on the canvas.
getter/setter pair
rotation ↔ double
The rotation of the layer in radians.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale ↔ double
The scale factor of the layer.
getter/setter pair
type ↔ LayerType
The type of the layer.
getter/setter pair
width ↔ double?
Explicit width of the layer (null means auto-size).
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) → LayerModel