setError method
Set an error object.
If PdfDocumentRef.autoDispose is true, the previous document will be disposed on setting the error.
Implementation
void setError(Object error, [StackTrace? stackTrace]) {
_error = error;
_stackTrace = stackTrace;
if (ref.autoDispose) {
_document?.dispose();
}
_document = null;
_revision++;
notifyListeners();
}