PdfAnnotationResult class

The outcome of a PDF annotation session.

Exactly one of isSuccess, isCancelled, or isError is true.

final result = await FlutterPdfAnnotations.openPDF(filePath: path);

if (result.isSuccess) {
  print('Saved to ${result.savedPath}');
} else if (result.isCancelled) {
  print('User cancelled');
} else {
  print('Error: ${result.error}');
}

Constructors

PdfAnnotationResult.cancelled()
Creates a result representing user cancellation (no file saved).
factory
PdfAnnotationResult.error(String message)
Creates an error result with a human-readable message.
factory
PdfAnnotationResult.success(String path)
Creates a successful result with the path of the saved PDF.
factory

Properties

cancelled bool
Whether the user closed the editor without saving.
final
error String?
A human-readable description of the error.
final
hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
true when the user dismissed the editor without saving.
no setter
isError bool
true when an error prevented the operation from completing. error contains a description.
no setter
isSuccess bool
true when the user saved the PDF. savedPath is non-null.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savedPath String?
The path of the saved annotated PDF.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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