DiagramStoryCommands class final

Canonical text mutations for shapes, standalone text and connector labels. No mounted editor or platform text input is required. Text extensions add their commands through update. They change any text, including parts a person cannot edit on the canvas (ShapeText(editable: false)); locks and host policies still apply.

Constructors

DiagramStoryCommands(DiagramController store)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → DiagramController
final

Methods

markerActivation({required String elementId, String? storyId, required String blockId}) → ({TextStory after, TextStory before, String label})?
The story after activating a paragraph's marker, such as a checklist box, as the text filling its slot defines; null when it has none. Perform replaceText with it to apply the activation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replace({required String elementId, required TextStory before, required TextStory after, String label = 'Edit text', StorySelection? selectionAfter}) → EditResult
replaceAll(Iterable<TextStoryReplacement> replacements, {String label = 'Edit text', StorySelection? selectionAfter}) → EditResult
Replaces distinct stories in one admitted publication and undo entry. Any stale story, invalid replacement or denied target rejects the batch.
setAlignment({required String elementId, String? storyId, required ParagraphAlignment alignment, int start = 0, int? end}) → EditResult
setDirection({required String elementId, String? storyId, required ParagraphDirection direction, int start = 0, int? end}) → EditResult
Formats the supplied range, or all text when the range is omitted.
setPlainText({required String elementId, required String text, String? storyId, String? slotId}) → EditResult
Replaces content with plain paragraphs, preserving the story identity. Formatting and list structure are reset. CRLF and CR become line breaks. Supply storyId for connectors with multiple labels. Admission enforces the slot's text and line limit, locks and host policies; success is one undo entry.
toString() → String
A string representation of this object.
inherited
update({required String elementId, String? storyId, required String label, required TextStory? transform(ResolvedDiagramTextTarget target)}) → EditResult

Operators

operator ==(Object other) → bool
The equality operator.
inherited