onComplete property
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'PrintDocumentAdapter.onFinish', apiUrl: 'https://developer.android.com/reference/android/print/PrintDocumentAdapter#onFinish()', note: '`completed` is always `true` and `error` is always `null`.'), IOSPlatform(apiName: 'UIPrintInteractionController.CompletionHandler', apiUrl: 'https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler'), MacOSPlatform(apiName: 'NSPrintOperation.runModal', apiUrl: 'https://developer.apple.com/documentation/appkit/nsprintoperation/1532065-runmodal'), WindowsPlatform()])
getter/setter pair
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
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'PrintDocumentAdapter.onFinish',
apiUrl:
'https://developer.android.com/reference/android/print/PrintDocumentAdapter#onFinish()',
note: '`completed` is always `true` and `error` is always `null`.',
),
IOSPlatform(
apiName: 'UIPrintInteractionController.CompletionHandler',
apiUrl:
'https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler',
),
MacOSPlatform(
apiName: 'NSPrintOperation.runModal',
apiUrl:
'https://developer.apple.com/documentation/appkit/nsprintoperation/1532065-runmodal',
),
WindowsPlatform(),
],
)
PrintJobCompletionHandler? onComplete;