ImageLayer class

A layer representing an image.

Inheritance

Constructors

ImageLayer({String? id, required String source, Uint8List? bytes, bool isNetwork = false, double brightness = 0.0, double contrast = 1.0, double saturation = 1.0, double sepia = 0.0, double blur = 0.0, Offset position = const Offset(0, 0), double rotation = 0.0, double scale = 1.0})
ImageLayer.fromJson(Map<String, dynamic> json)
factory

Properties

blur ↔ double
Blur radius (0.0 to 20.0).
getter/setter pair
brightness ↔ double
Brightness adjustment (-1.0 to 1.0).
getter/setter pair
bytes ↔ Uint8List?
Raw image bytes (optional, takes precedence over source).
getter/setter pair
contrast ↔ double
Contrast adjustment (0.0 to 2.0).
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
height ↔ double?
Explicit height of the layer (null means auto-size).
getter/setter pairinherited
id ↔ String
Unique identifier for the layer.
getter/setter pairinherited
isLocked ↔ bool
Whether the layer is locked (prevents editing).
getter/setter pairinherited
isNetwork ↔ bool
Whether the image source is a network URL.
getter/setter pair
isSelected ↔ bool
Whether the layer is currently selected.
getter/setter pairinherited
opacity ↔ double
Opacity of the layer (0.0 to 1.0).
getter/setter pairinherited
position ↔ Offset
The position of the layer on the canvas.
getter/setter pairinherited
rotation ↔ double
The rotation of the layer in radians.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saturation ↔ double
Saturation adjustment (0.0 to 2.0).
getter/setter pair
scale ↔ double
The scale factor of the layer.
getter/setter pairinherited
sepia ↔ double
Sepia adjustment (0.0 to 1.0).
getter/setter pair
source ↔ String
The source of the image (path or URL).
getter/setter pair
type ↔ LayerType
The type of the layer.
getter/setter pairinherited
width ↔ double?
Explicit width of the layer (null means auto-size).
getter/setter pairinherited

Methods

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

Operators

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