Layer class

Represents a layer with common properties for widgets.

Implementers

Constructors

Layer.new({String? id, LayerInteraction? interaction, Offset offset = Offset.zero, double rotation = 0, double scale = 1, bool flipX = false, bool flipY = false, bool isDeleted = false, Map<String, dynamic>? meta})
Creates a new layer with optional properties.
Layer.fromMap(Map<String, dynamic> map, {List<Uint8List>? widgetRecords, WidgetLoader? widgetLoader, String? id, dynamic requirePrecache(EditorImage editorImage)?, EditorKeyMinifier? minifier})
Factory constructor for creating a Layer instance from a map and a list of stickers.
factory

Properties

flipX bool
Flags to control horizontal and vertical flipping.
getter/setter pair
flipY bool
Flags to control horizontal and vertical flipping.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
A unique identifier for the layer.
getter/setter pair
interaction LayerInteraction
The interaction settings for the layer.
getter/setter pair
isDeleted bool
Flag which indicates to the history that the layer is removed.
getter/setter pair
key GlobalKey<State<StatefulWidget>>
Global key associated with the Layer instance, used for accessing the widget tree.
getter/setter pair
meta Map<String, dynamic>?
A map containing metadata associated with the layer.
getter/setter pair
offset Offset
The position offset of the widget.
getter/setter pair
rotation double
The rotation and scale values of the widget.
getter/setter pair
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 pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts this transform object to a Map.
toMapFromReference(Layer layer) Map<String, dynamic>
Converts the current layer to a map representation, comparing it with a reference layer.
toString() String
A string representation of this object.
inherited

Operators

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