onError property
Called when the document fails to load or parse (network/asset error or a corrupt/encrypted PDF). Use it to log the error or surface an app-level message. The widget still shows its own error state (see errorBuilder).
Implementation
final void Function(Object error)? onError;