TextLayerData constructor

TextLayerData({
  1. required String text,
  2. bool customSecondaryColor = false,
  3. TextStyle? textStyle,
  4. LayerBackgroundMode? colorMode,
  5. double? colorPickerPosition,
  6. Color color = Colors.white,
  7. Color background = Colors.transparent,
  8. TextAlign align = TextAlign.left,
  9. double fontScale = 1.0,
  10. Offset? offset,
  11. double? rotation,
  12. double? scale,
  13. String? id,
  14. bool? flipX,
  15. bool? flipY,
  16. 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,
});