PdfService class

A Manager that contains all operations for PDF services

Inheritance

Constructors

PdfService({required PDFPageFormat pageFormat, required List<Font> fonts, Future<Font> onRequestBoldFont(String fontFamily)?, Future<Font> onRequestBothFont(String fontFamily)?, Future<List<Font>?> onRequestFallbacks(String fontFamily)?, Future<Font> onRequestFont(String fontFamily)?, Future<Font> onRequestItalicFont(String fontFamily)?, required List<CustomWidget> customBuilders, required Delta document, ThemeData? customTheme, Font? codeBlockFont, PdfColor? blockQuoteBackgroundColor, PdfColor? codeBlockBackgroundColor, TextStyle? codeBlockNumLinesTextStyle, TextStyle? codeBlockTextStyle, PdfColor? blockQuoteDividerColor, TextStyle? blockQuoteTextStyle, double? blockQuotePaddingLeft, double? blockQuotePaddingRight, double? blockQuotethicknessDividerColor, PDFWidgetBuilder<List<InlineSpan>, Widget>? onDetectBlockquote, PDFWidgetBuilder<List<InlineSpan>, Widget>? onDetectCodeBlock, PDFWidgetBuilder<List<InlineSpan>, Widget>? onDetectAlignedParagraph, PDFWidgetBuilder<Line, List<InlineSpan>>? onDetectCommonText, PDFWidgetBuilder<List<InlineSpan>, Widget>? onDetectHeaderBlock, PDFWidgetBuilder<Line, Widget>? onDetectImageBlock, PDFWidgetBuilder<Line, List<InlineSpan>>? onDetectInlineRichTextStyles, PDFWidgetBuilder<Line, List<InlineSpan>>? onDetectLink, PDFWidgetBuilder<List<InlineSpan>, Widget>? onDetectList, Delta? backM, Delta? frontM})

Properties

backM → Delta?
finalinherited
blockQuoteBackgroundColor → PdfColor?
finalinherited
blockQuoteDividerColor → PdfColor?
finalinherited
blockQuotePaddingLeft double?
finalinherited
blockQuotePaddingRight double?
finalinherited
blockQuoteTextStyle → TextStyle?
finalinherited
blockQuotethicknessDividerColor double?
finalinherited
codeBlockBackgroundColor → PdfColor?
finalinherited
codeBlockFont → Font?
finalinherited
codeBlockNumLinesTextStyle → TextStyle?
finalinherited
codeBlockTextStyle → TextStyle?
finalinherited
contentPerPage List<Widget>
final
customBuilders List<CustomWidget>
finalinherited
defaultFontSize int
finalinherited
defaultLinkColor ↔ PdfColor
latefinalinherited
defaultTextStyle ↔ TextStyle
latefinalinherited
defaultTheme ↔ ThemeData
latefinalinherited
document → Delta
no setterinherited
frontM → Delta?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
lastListIndent int
getter/setter pairinherited
numberIndent1List int
getter/setter pairinherited
numberIndent2List int
getter/setter pairinherited
numberIndent3List int
getter/setter pairinherited
numberIndent4List int
getter/setter pairinherited
numberIndent5List int
getter/setter pairinherited
numberList int
getter/setter pairinherited
numCodeLine int
getter/setter pairinherited
onDetectAlignedParagraph PDFWidgetBuilder<List<InlineSpan>, Widget>?
finalinherited
onDetectBlockquote PDFWidgetBuilder<List<InlineSpan>, Widget>?
finalinherited
onDetectCodeBlock PDFWidgetBuilder<List<InlineSpan>, Widget>?
finalinherited
onDetectCommonText PDFWidgetBuilder<Line, List<InlineSpan>>?
finalinherited
onDetectHeaderBlock PDFWidgetBuilder<List<InlineSpan>, Widget>?
finalinherited
onDetectImageBlock PDFWidgetBuilder<Line, Widget>?
finalinherited
onDetectInlineRichTextStyles PDFWidgetBuilder<Line, List<InlineSpan>>?
finalinherited
finalinherited
onDetectList PDFWidgetBuilder<List<InlineSpan>, Widget>?
finalinherited
onRequestBoldFont Future<Font> Function(String fontFamily)?
finalinherited
onRequestBothFont Future<Font> Function(String fontFamily)?
finalinherited
onRequestFallbacks Future<List<Font>?> Function(String fontFamily)?
finalinherited
onRequestFont Future<Font> Function(String fontFamily)?
finalinherited
onRequestItalicFont Future<Font> Function(String fontFamily)?
finalinherited
pageHeight double
latefinalinherited
pageWidth double
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

blockGenerators(Document document) Future<List<Widget>>
This function generate widgets to create a book with custom views of the content
override
generateDoc() Future<Document>
This functions generates the document
override
generatePages({required List<Delta> documents}) Future<List<Map<String, dynamic>>>
This function create a (valid) file transforming delta format to markdown and detecting all markdown syntax for put the attributes to the paragraph
override
generateWidget({double? maxWidth, double? maxHeight}) Future<Widget>
Use generateWidget to create whole widgets that are commonly pasted into a document, giving you full control of the new widgets generated
override
getAlignedHeaderBlock(List<InlineSpan> spansToWrap, int headerLevel, String align, int indentLevel, [TextStyle? style]) Future<Widget>
inherited
getAlignedParagraphBlock(List<InlineSpan> spansToWrap, String align, int indentLevel, [TextStyle? style]) Future<Widget>
inherited
getBlockQuote(List<InlineSpan> spansToWrap, [TextStyle? style]) Future<Widget>
inherited
getCodeBlock(List<InlineSpan> spansToWrap, [TextStyle? style]) Future<Widget>
inherited
getHeaderBlock(List<InlineSpan> spansToWrap, int headerLevel, int indentLevel, [TextStyle? style]) Future<Widget>
inherited
getImageBlock(Line line, [Alignment? alignment]) Future<Widget>
inherited
getLinkStyle(Line line, [TextStyle? style, bool addFontSize = true]) Future<List<TextSpan>>
inherited
getListBlock(List<InlineSpan> spansToWrap, String listType, String align, int indentLevel, [TextStyle? style]) Future<Widget>
inherited
getRichTextInlineStyles(Line line, [TextStyle? style, bool returnContentIfNeedIt = false, bool addFontSize = true]) Future<List<InlineSpan>>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verifyBlock(Map<String, dynamic>? blockAttributes) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited