setDirection method

EditResult setDirection({
  1. required String elementId,
  2. String? storyId,
  3. required ParagraphDirection direction,
  4. int start = 0,
  5. int? end,
})

Formats the supplied range, or all text when the range is omitted.

Implementation

EditResult setDirection({
  required String elementId,
  String? storyId,
  required ParagraphDirection direction,
  int start = 0,
  int? end,
}) => update(
  elementId: elementId,
  storyId: storyId,
  label: 'Change text direction',
  transform: (target) => DiagramTextCommands.setDirectionInRange(
    story: target.canonical.story,
    start: start,
    end: end,
    direction: direction,
  ),
);