InteractivePdfViewer constructor

InteractivePdfViewer({
  1. dynamic onQuote(
    1. String,
    2. int,
    3. Map<String, dynamic>
    )?,
  2. dynamic onClearAllQuotes()?,
  3. dynamic onQuoteRemoved(
    1. String text,
    2. int pageNumber
    )?,
  4. dynamic onInfoButton()?,
  5. dynamic onShareButton()?,
  6. dynamic onPageChanged(
    1. int pageNumber,
    2. int totalPages
    )?,
  7. bool shouldHighlightQuotes = true,
  8. String highlightColor = '#FFEB3B',
})

Creates a new instance of InteractivePdfViewer

onQuote Optional callback for when text is quoted onClearAllQuotes Optional callback for when all quotes are cleared onQuoteRemoved Optional callback for when a specific quote is removed onInfoButton Optional callback for when info button is pressed onShareButton Optional callback for when share button is pressed onPageChanged Optional callback for when the page changes, provides current page number and total pages shouldHighlightQuotes Optional boolean to determine if quoted text should be highlighted (defaults to true) highlightColor Optional color for the highlight in hex format (defaults to '#FFEB3B')

Implementation

InteractivePdfViewer({
  this.onQuote,
  this.onClearAllQuotes,
  this.onQuoteRemoved,
  this.onInfoButton,
  this.onShareButton,
  this.onPageChanged,
  this.shouldHighlightQuotes = true,
  this.highlightColor = '#FFEB3B',
}) {
  _channel.setMethodCallHandler(_handleMethodCall);
}