Paragraph.fromRawEmbed constructor
Paragraph.fromRawEmbed({})
Constructs a Paragraph instance from a Object embed.
operation
is the Quill Delta operation representing the embed.
Implementation
factory Paragraph.fromRawEmbed(
{required Object data,
Map<String, dynamic>? attributes,
Map<String, dynamic>? blockAttributes}) {
return Paragraph(
lines: <Line>[
Line.fromData(data: data, attributes: attributes),
],
blockAttributes: blockAttributes,
type: data is String
? blockAttributes != null
? ParagraphType.block
: ParagraphType.inline
: ParagraphType.embed,
)..seal();
}