Paragraph.fromEmbed constructor
Paragraph.fromEmbed(
- Operation operation
Constructs a Paragraph instance from a Quill Delta embed operation.
This factory method creates a paragraph with a single line from the provided embed operation.
operation
is the Quill Delta operation representing the embed.
Implementation
factory Paragraph.fromEmbed(fq.Operation operation) {
return Paragraph(
lines: [
Line(data: operation.data, attributes: operation.attributes),
],
type: ParagraphType.embed,
);
}