TextLayerData class
Represents a text layer with customizable properties.
Constructors
- TextLayerData({required String text, bool customSecondaryColor = false, TextStyle? textStyle, LayerBackgroundMode? colorMode, double? colorPickerPosition, Color color = Colors.white, Color background = Colors.transparent, TextAlign align = TextAlign.left, double fontScale = 1.0, Offset? offset, double? rotation, double? scale, String? id, bool? flipX, bool? flipY, bool? enableInteraction})
- Creates a new text layer with customizable properties.
-
TextLayerData.fromMap(Layer layer, Map<
String, dynamic> map) -
Factory constructor for creating a TextLayerData instance from a Layer
instance and a map.
factory
Properties
- align ↔ TextAlign
-
The text alignment within the layer.
getter/setter pair
- background ↔ Color
-
The background color for the text.
getter/setter pair
- color ↔ Color
-
The text color.
getter/setter pair
- colorMode ↔ LayerBackgroundMode?
-
The color mode for the text.
getter/setter pair
- colorPickerPosition ↔ double?
-
The position of the color picker (if applicable).
getter/setter pair
- customSecondaryColor ↔ bool
-
This flag define if the secondary color is manually set.
getter/setter pair
- 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
- fontScale ↔ double
-
The font scale for text, to make text bigger or smaller.
getter/setter pair
- 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
- text ↔ String
-
The text content of the layer.
getter/setter pair
- textStyle ↔ TextStyle?
-
A custom text style for the text. Be careful the editor allow not to
import and export this style.
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited