setDownloadDelegate method

Future<void> setDownloadDelegate(
  1. WebViewDownloadDelegate? delegate
)

Sets download handling without creating a download UI. Available actions are advertised on each request. Web iframe downloads may be browser-owned and cannot all be observed. Pass null to restore existing platform behavior. Updating the delegate cancels unanswered requests; accepted downloads keep reporting to their original delegate until completion or controller disposal.

Implementation

Future<void> setDownloadDelegate(WebViewDownloadDelegate? delegate) =>
    platform.setDownloadDelegate(delegate);