TextNode constructor
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,
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,
);