ShapeText constructor
const
ShapeText(
- String slotId, {
- String text = '',
- DiagramTextDefinition textType = const PlainTextDefinition(),
- ParagraphAlignment alignment = ParagraphAlignment.start,
- bool overflow = false,
- bool editable = true,
- TextRole role = TextRole.body,
- double horizontalPadding = 8,
- double verticalPadding = 0,
- DiagramTextVerticalAlignment verticalAlignment = DiagramTextVerticalAlignment.center,
- String? placeholder,
- int clampLines = 0,
Implementation
const ShapeText(
this.slotId, {
this.text = '',
this.textType = const PlainTextDefinition(),
this.alignment = ParagraphAlignment.start,
this.overflow = false,
this.editable = true,
this.role = TextRole.body,
this.horizontalPadding = 8,
this.verticalPadding = 0,
this.verticalAlignment = DiagramTextVerticalAlignment.center,
this.placeholder,
this.clampLines = 0,
}) : assert(clampLines >= 0),
assert(
clampLines == 0 || !editable,
'A clamped text slot is not edited in place.',
);