TextLayer class

A layer representing text content.

Inheritance

Constructors

TextLayer({String? id, required String text, TextStyle style = const TextStyle(fontSize: 20, color: Colors.black), TextAlign align = TextAlign.left, double letterSpacing = 0.0, double lineHeight = 1.2, Color shadowColor = Colors.transparent, double shadowBlur = 0.0, Offset shadowOffset = const Offset(2, 2), double strokeWidth = 0.0, Color strokeColor = Colors.black, Offset position = const Offset(0, 0), double rotation = 0.0, double scale = 1.0})
TextLayer.fromJson(Map<String, dynamic> json)
factory

Properties

align ↔ TextAlign
The alignment of the text.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
height ↔ double?
Explicit height of the layer (null means auto-size).
getter/setter pairinherited
id ↔ String
Unique identifier for the layer.
getter/setter pairinherited
isLocked ↔ bool
Whether the layer is locked (prevents editing).
getter/setter pairinherited
isSelected ↔ bool
Whether the layer is currently selected.
getter/setter pairinherited
letterSpacing ↔ double
Letter spacing.
getter/setter pair
lineHeight ↔ double
Line height.
getter/setter pair
opacity ↔ double
Opacity of the layer (0.0 to 1.0).
getter/setter pairinherited
position ↔ Offset
The position of the layer on the canvas.
getter/setter pairinherited
rotation ↔ double
The rotation of the layer in radians.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale ↔ double
The scale factor of the layer.
getter/setter pairinherited
shadowBlur ↔ double
Shadow blur radius.
getter/setter pair
shadowColor ↔ Color
Shadow color.
getter/setter pair
shadowOffset ↔ Offset
Shadow offset.
getter/setter pair
strokeColor ↔ Color
Stroke color.
getter/setter pair
strokeWidth ↔ double
Stroke width (0 for no stroke).
getter/setter pair
style ↔ TextStyle
The style of the text.
getter/setter pair
text ↔ String
The text content.
getter/setter pair
type ↔ LayerType
The type of the layer.
getter/setter pairinherited
width ↔ double?
Explicit width of the layer (null means auto-size).
getter/setter pairinherited

Methods

copyWith({String? text, TextStyle? style, TextAlign? align, double? letterSpacing, double? lineHeight, Color? shadowColor, double? shadowBlur, Offset? shadowOffset, double? strokeWidth, Color? strokeColor, Offset? position, double? rotation, double? scale, double? opacity, bool? isLocked, double? width, double? height}) → TextLayer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited