TextLayerData constructor
TextLayerData({
- required String text,
- LayerBackgroundColorModeE? colorMode,
- double? colorPickerPosition,
- required TextStyle fontStyle,
- Color color = Colors.white,
- Color background = Colors.transparent,
- TextAlign align = TextAlign.left,
- Offset? offset,
- double? rotation,
- double? scale,
- String? id,
- bool? flipX,
- bool? flipY,
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 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.colorMode,
this.colorPickerPosition,
required this.fontStyle,
this.color = Colors.white,
this.background = Colors.transparent,
this.align = TextAlign.left,
super.offset,
super.rotation,
super.scale,
super.id,
super.flipX,
super.flipY,
});