onPrintRequest property

(Future<bool?> Function(T controller, WebUri? url, PlatformPrintJobController? printJobController)?) onPrintRequest
final

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. NOTE: on Web, it is always null

NOTE for Web: this event will be called only if the iframe has the same origin.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • MacOS
  • Web

Implementation

final Future<bool?> Function(T controller, WebUri? url,
    PlatformPrintJobController? printJobController)? onPrintRequest;