diagramSetTextVerb top-level property
The verb every text part offers, bound to its slot: its whole text as plain paragraphs, one per line.
Story identity, roles and slot bindings are preserved; marks, lists and paragraph formatting reset. Text that does not fit the slot is denied.
Implementation
final DiagramVerb diagramSetTextVerb = DiagramVerb(
id: 'setText',
label: 'Text',
description: 'Replaces the text with plain paragraphs, one per line.',
symmetry: DiagramVerbSymmetry.setter,
parameters: [DiagramVerbParameter.text('text'), _storyParameter],
perform: (call) => _story(call).setPlainText(
elementId: call.id,
text: call.arg('text'),
storyId: call.optional('storyId'),
slotId: call.part,
),
);