PdfPreviewCustom class
Flutter widget that uses the rasterized pdf pages to display a document.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PdfPreviewCustom
Constructors
-
PdfPreviewCustom.new({Key? key, PdfPageFormat pageFormat = PdfPageFormat.a4, required LayoutCallback build, double? maxPageWidth, Widget onError(BuildContext context, Object error)?, Decoration? scrollViewDecoration, Decoration? pdfPreviewPageDecoration, List<
int> ? pages, EdgeInsets? previewPageMargin, EdgeInsets? padding, bool shouldRepaint = false, Widget? loadingWidget, double? dpi, ScrollPhysics? scrollPhysics, bool shrinkWrap = false, CustomPdfPagesBuilder? pagesBuilder}) -
Show a pdf document built on demand
const
Properties
- build → LayoutCallback
-
Called when a pdf document is needed
final
- dpi → double?
-
The rendering dots per inch resolution
If not provided, this value is calculated.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingWidget → Widget?
-
Custom loading widget to use that is shown while PDF is being generated.
If null, a CircularProgressIndicator is used instead.
final
- maxPageWidth → double?
-
Maximum width of the pdf document on screen
final
- onError → Widget Function(BuildContext context, Object error)?
-
Widget to display if the PDF document cannot be displayed
final
- padding → EdgeInsets?
-
padding for the pdf_preview widget
final
- pageFormat → PdfPageFormat
-
Pdf paper page format
final
-
pages
→ List<
int> ? -
Pages to display. Default will display all the pages.
final
- pagesBuilder → CustomPdfPagesBuilder?
-
clients can pass this builder to render
their own pages.
final
- pdfPreviewPageDecoration → Decoration?
-
Decoration of PdfPreviewPage
final
- previewPageMargin → EdgeInsets?
-
margin for the document preview page
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollPhysics → ScrollPhysics?
-
The physics for the scrollView - e.g. use this to disable scrolling inside a scrollable
final
- scrollViewDecoration → Decoration?
-
Decoration of scrollView
final
- shouldRepaint → bool
-
Force repainting the PDF document
final
- shrinkWrap → bool
-
Whether the scrollView should be shrinkwrapped
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → PdfPreviewCustomState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited