TextNode constructor

TextNode(
  1. String text, {
  2. String name = '',
  3. double x = 0,
  4. double y = 0,
  5. double? width,
  6. double? height,
  7. SceneColor? fill,
  8. SceneColor? borderColor,
  9. double borderWidth = 1,
  10. double corner = 0,
  11. double? cornerTopLeft,
  12. double? cornerTopRight,
  13. double? cornerBottomRight,
  14. double? cornerBottomLeft,
  15. double? minWidth,
  16. double? maxWidth,
  17. double? minHeight,
  18. double? maxHeight,
  19. double opacity = 1,
  20. bool visible = true,
  21. SceneTextAlign align = SceneTextAlign.left,
  22. int? maxLines,
  23. SceneTextStyle? style,
})

The ordinary text: one run, no deltas.

Implementation

factory TextNode(
  String text, {
  String name = '',
  double x = 0,
  double y = 0,
  double? width,
  double? height,
  SceneColor? fill,
  SceneColor? borderColor,
  double borderWidth = 1,
  double corner = 0,
  double? cornerTopLeft,
  double? cornerTopRight,
  double? cornerBottomRight,
  double? cornerBottomLeft,
  double? minWidth,
  double? maxWidth,
  double? minHeight,
  double? maxHeight,
  double opacity = 1,
  bool visible = true,
  SceneTextAlign align = SceneTextAlign.left,
  int? maxLines,
  SceneTextStyle? style,
}) => TextNode.rich(
  [TextRun(text)],
  name: name,
  x: x,
  y: y,
  width: width,
  height: height,
  fill: fill,
  borderColor: borderColor,
  borderWidth: borderWidth,
  corner: corner,
  cornerTopLeft: cornerTopLeft,
  cornerTopRight: cornerTopRight,
  cornerBottomRight: cornerBottomRight,
  cornerBottomLeft: cornerBottomLeft,
  minWidth: minWidth,
  maxWidth: maxWidth,
  minHeight: minHeight,
  maxHeight: maxHeight,
  opacity: opacity,
  visible: visible,
  align: align,
  maxLines: maxLines,
  style: style,
);