onComplete property
A completion handler used to handle the conclusion of the print job (for instance, to reset state) and to handle any errors encountered in printing.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - PrintDocumentAdapter.onFinish):
completedis alwaystrueanderroris alwaysnull.
- iOS WKWebView (Official API - UIPrintInteractionController.CompletionHandler)
- macOS WKWebView (Official API - NSPrintOperation.runModal)
- Windows WebView2
Parameters - Officially Supported Platforms/Implementations:
completed: all platformserror: all platforms
Use the PlatformPrintJobController.isPropertySupported method to check if this property is supported at runtime.
Implementation
PrintJobCompletionHandler? get onComplete => platform.onComplete;
Implementation
void set onComplete(PrintJobCompletionHandler? handler) {
platform.onComplete = handler;
}