PDFViewer class

PDFViewer, a inbuild pdf viewer, you can create your own too. document an instance of PDFDocument, document to be loaded indicatorText color of indicator text indicatorBackground color of indicator background pickerButtonColor the picker button background color pickerIconColor the picker button icon color indicatorPosition position of the indicator position defined by IndicatorPosition enum showIndicator show,hide indicator showPicker show hide picker showNavigation show hide navigation bar toolTip tooltip, instance of PDFViewerTooltip enableSwipeNavigation enable,disable swipe navigation scrollDirection scroll direction horizontal or vertical lazyLoad lazy load pages or load all at once controller page controller to control page viewer zoomSteps zoom steps for pdf page minScale minimum zoom scale for pdf page maxScale maximum zoom scale for pdf page panLimit pan limit for pdf page onPageChanged function called when page changes

Inheritance

Constructors

PDFViewer({Key? key, required PDFDocument document, Axis? scrollDirection, bool lazyLoad = true, Color indicatorText = Colors.white, Color indicatorBackground = Colors.black54, Widget numberPickerConfirmWidget = const Text('OK'), bool showIndicator = true, bool showPicker = true, bool showNavigation = true, bool enableSwipeNavigation = true, PDFViewerTooltip tooltip = const PDFViewerTooltip(), Widget navigationBuilder(BuildContext, int? pageNumber, int? totalPages, void jumpToPage({int page}), void animateToPage({int? page}))?, PageController? controller, IndicatorPosition indicatorPosition = IndicatorPosition.topRight, int? zoomSteps, double? minScale, double? maxScale, double? panLimit, Widget? progressIndicator, Color? pickerButtonColor, Color? pickerIconColor, ValueChanged<int>? onPageChanged, Color? backgroundColor, Widget indicatorBuilder(BuildContext, int? pageNumber, int? totalPages)?, dynamic onZoomChanged(double)?})

Properties

backgroundColor Color?
final
controller PageController?
final
document PDFDocument
final
enableSwipeNavigation bool
final
hashCode int
The hash code for this object.
no setterinherited
indicatorBackground Color
final
indicatorBuilder → (Widget Function(BuildContext, int? pageNumber, int? totalPages)?)
final
indicatorPosition IndicatorPosition
final
indicatorText Color
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lazyLoad bool
final
maxScale double?
final
minScale double?
final
final
numberPickerConfirmWidget Widget
final
onPageChanged ValueChanged<int>?
final
onZoomChanged → (dynamic Function(double)?)
final
panLimit double?
final
pickerButtonColor Color?
final
pickerIconColor Color?
final
progressIndicator Widget?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis?
final
showIndicator bool
final
showNavigation bool
final
showPicker bool
final
tooltip PDFViewerTooltip
final
zoomSteps int?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _PDFViewerState
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}) 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