TextLayerData constructor
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.
The text
parameter specifies the text content of the layer.
The colorMode
parameter sets the color mode for the text.
The colorPickerPosition
parameter sets the position of the color picker
(if applicable).
The color
parameter specifies the text color (default is Colors.white).
The background
parameter defines the background color for the text
(default is Colors.transparent).
The align
parameter determines the text alignment within the layer
(default is TextAlign.left).
The other optional parameters such as textStyle
, offset
, rotation
,
scale
, id
, flipX
, and flipY
can be used to customize the position, appearance, and behavior of the
text layer.
Implementation
TextLayerData({
required this.text,
this.customSecondaryColor = false,
this.textStyle,
this.colorMode,
this.colorPickerPosition,
this.color = Colors.white,
this.background = Colors.transparent,
this.align = TextAlign.left,
this.fontScale = 1.0,
super.offset,
super.rotation,
super.scale,
super.id,
super.flipX,
super.flipY,
super.enableInteraction,
});