PdfDocumentListenable class
The class is used to load the referenced document and notify the listeners.
- Inheritance
-
- Object
- Listenable
- PdfDocumentListenable
Properties
- bytesDownloaded → int
-
The number of bytes downloaded so far. (For remote document only)
no setter
- document → PdfDocument?
-
The PdfDocument instance if available.
no setter
- error → Object?
-
The error object if some error was occurred on the previous attempt to load the document.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadAttempted → bool
-
Whether document loading is attempted in the past or not.
no setter
- ref → PdfDocumentRef
-
A PdfDocumentRef instance that references the PdfDocumentListenable.
final
- revision → int
-
Revision is incremented every time document or error is updated.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
no setter
- totalBytes → int?
-
The total number of bytes to download. (For remote document only)
no setter
Methods
-
addListener(
VoidCallback listener) → VoidCallback -
Register a listener to be notified when the document state is changed (such as loaded, or error).
override
-
load(
{bool forceReload = false}) → Future< PdfDownloadReport?> - Load the document.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
override
-
setDocument(
PdfDocument newDocument) → bool - Set a new document.
-
setError(
Object error, [StackTrace? stackTrace]) → void - Set an error object.
-
toString(
) → String -
A string representation of this object.
inherited
-
useDocument<
T> (FutureOr< T> task(PdfDocument document), {bool ensureLoaded = true, Completer? cancelLoading}) → FutureOr<T?> - Within call to the function, it ensures that the document is alive (not null and not disposed).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited