ShapeText class final
A text slot. Stable slot IDs are also used by
DiagramController.setText(id, text, slot: ...).
Constructors
- 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})
-
const
Properties
- alignment → ParagraphAlignment
-
final
- editable → bool
-
False keeps people from editing this text on the canvas. Host code and
verbs, such as
setText, still set any text; text is only the text a new shape starts with.final - hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalPadding → double
-
final
- minimumSize → DiagramSize
-
no setteroverride
- overflow → bool
-
Allows a single-line title to extend beyond its allocated region.
final
- placeholder → String?
-
Editor-only hint shown while the slot is empty, such as
"Write a comment…".
final
- role → TextRole
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slotId → String
-
final
- text → String
-
final
- textType → DiagramTextDefinition
-
The text filling this slot, with its line limit; plain unless a text
extension's is given.
final
- verticalAlignment → DiagramTextVerticalAlignment
-
final
- verticalPadding → double
-
final
Methods
-
minimumSizeFor(
FramedElement shape, Map< String, double> textHeights) → DiagramSize -
inherited
-
named(
String name) → ShapePart -
Reuses this part with namespaced text slots and explicitly named surfaces.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited