TextNode constructor

TextNode({
  1. required NodeId id,
  2. required String text,
  3. required Size size,
  4. double fontSize = 24,
  5. required Color color,
  6. TextAlign align = TextAlign.left,
  7. bool isBold = false,
  8. bool isItalic = false,
  9. bool isUnderline = false,
  10. String? fontFamily,
  11. double? maxWidth,
  12. double? lineHeight,
  13. double hitPadding = 0,
  14. Transform2D? transform,
  15. double opacity = 1,
  16. bool isVisible = true,
  17. bool isSelectable = true,
  18. bool isLocked = false,
  19. bool isDeletable = true,
  20. 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);