TextNode.rich constructor
TextNode.rich(
- List<
TextRun> runs, { - 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,
A paragraph of several runs, each with its own delta over style —
one paragraph, laid out and wrapped as one, which is the whole reason a
bold word is not a second node beside the first.
Implementation
TextNode.rich(
List<TextRun> runs, {
super.name,
super.x,
super.y,
super.width,
super.height,
super.fill,
super.borderColor,
super.borderWidth,
super.corner,
super.cornerTopLeft,
super.cornerTopRight,
super.cornerBottomRight,
super.cornerBottomLeft,
super.minWidth,
super.maxWidth,
super.minHeight,
super.maxHeight,
super.opacity,
super.visible,
this.align = SceneTextAlign.left,
this.maxLines,
SceneTextStyle? style,
}) : runs = [...runs],
fontFamily = style?.fontFamily,
fontSize = style?.fontSize ?? 16,
weight = style?.weight ?? SceneFontWeight.w400,
italic = style?.italic ?? false,
letterSpacing = style?.letterSpacing ?? 0,
wordSpacing = style?.wordSpacing ?? 0,
lineHeight = style?.lineHeight ?? 1.15,
color = style?.color ?? const SceneColor(0xFF1A1A1A),
textCase = style?.textCase ?? SceneTextCase.none,
decoration = style?.decoration ?? SceneTextDecoration.none,
decorationColor = style?.decorationColor,
decorationThickness = style?.decorationThickness ?? 1,
decorationStyle =
style?.decorationStyle ?? SceneTextDecorationStyle.solid,
layers = [...?style?.layers],
axes = {...?style?.axes};