onPrintRequest method
FutureOr<bool?> ?
onPrintRequest(
- WebUri? url,
- PlatformPrintJobController? printJobController
inherited
Event fired when window.print() is called from JavaScript side.
Return true if you want to handle the print job.
Otherwise return false, so the PlatformPrintJobController will be handled and disposed automatically by the system.
url represents the url on which is called.
printJobController represents the controller of the print job created.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - View.scrollBy)
- iOS WKWebView (Official API - UIScrollView.setContentOffset)
- macOS WKWebView:
- This method is implemented using JavaScript.
Parameters - Officially Supported Platforms/Implementations:
url: all platformsprintJobController: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@override
FutureOr<bool?>? onPrintRequest(
WebUri? url,
PlatformPrintJobController? printJobController,
) {
return null;
}