TextNode constructor
TextNode({ - required NodeId id,
- required String text,
- required Size size,
- double fontSize = 24,
- required Color color,
- TextAlign align = TextAlign.left,
- bool isBold = false,
- bool isItalic = false,
- bool isUnderline = false,
- String? fontFamily,
- double? maxWidth,
- double? lineHeight,
- double hitPadding = 0,
- Transform2D? transform,
- double opacity = 1,
- bool isVisible = true,
- bool isSelectable = true,
- bool isLocked = false,
- bool isDeletable = true,
- bool isTransformable = true,
})
Implementation
TextNode({
required super.id,
required this.text,
required this.size,
this.fontSize = 24,
required this.color,
this.align = TextAlign.left,
this.isBold = false,
this.isItalic = false,
this.isUnderline = false,
this.fontFamily,
this.maxWidth,
this.lineHeight,
super.hitPadding,
super.transform,
super.opacity,
super.isVisible,
super.isSelectable,
super.isLocked,
super.isDeletable,
super.isTransformable,
}) : super(type: NodeType.text);