cloneTextParagraph function
TextParagraph
cloneTextParagraph(
- TextParagraph block,
- String nextId(
- String kind
- String? slotId,
Copies authored paragraph attributes while assigning a new durable identity.
Implementation
TextParagraph cloneTextParagraph(
TextParagraph block,
String Function(String kind) nextId, {
String? slotId,
}) => TextParagraph(
id: nextId('block'),
runs: block.runs,
attributes: block.attributes,
alignment: block.alignment,
direction: block.direction,
role: block.role,
slotId: slotId ?? block.slotId,
);