onPrintRequest method

  1. @override
FutureOr<bool?>? onPrintRequest(
  1. WebUri? url,
  2. 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:

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms
  • printJobController: 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;
}