StickerLayerData class
A class representing a layer with custom sticker content.
StickerLayerData is a subclass of Layer that allows you to display custom sticker content. You can specify properties like offset, rotation, scale, and more.
Example usage:
StickerLayerData(
offset: Offset(50.0, 50.0),
rotation: -30.0,
scale: 1.5,
);
Constructors
- StickerLayerData({required Widget sticker, Offset? offset, double? rotation, double? scale, String? id, bool? flipX, bool? flipY, bool? enableInteraction})
- Creates an instance of StickerLayerData.
-
StickerLayerData.fromMap(Layer layer, Map<
String, dynamic> map, List<Uint8List> stickers) -
Factory constructor for creating a StickerLayerData instance from a
Layer, a map, and a list of stickers.
factory
Properties
- enableInteraction ↔ bool
-
Flag to enable or disable the user interaction with the layer.
getter/setter pairinherited
- 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
-
key
↔ GlobalKey<
State< StatefulWidget> > -
Global key associated with the Layer instance, used for accessing the
widget tree.
getter/setter pairinherited
- offset ↔ Offset
-
The position offset of the widget.
getter/setter pairinherited
- 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
- sticker ↔ Widget
-
The sticker to display on the layer.
getter/setter pair
Methods
-
copyWith(
{Widget? sticker, Offset? offset, double? rotation, double? scale, String? id, bool? flipX, bool? flipY, bool? enableInteraction}) → StickerLayerData - Creates a new instance of StickerLayerData with modified properties.
-
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.
inherited
-
toStickerMap(
int listPosition) → Map< String, dynamic> - Converts this transform object to a Map suitable for representing a sticker.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited