InAppWebView constructor

InAppWebView({
  1. Key? key,
  2. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  3. int? windowId,
  4. HeadlessInAppWebView? headlessWebView,
  5. InAppWebViewKeepAlive? keepAlive,
  6. bool? preventGestureDelay,
  7. TextDirection? layoutDirection,
  8. WebViewEnvironment? webViewEnvironment,
  9. @Deprecated('Use onGeolocationPermissionsHidePrompt instead') void androidOnGeolocationPermissionsHidePrompt(
    1. InAppWebViewController controller
    )?,
  10. @Deprecated('Use onGeolocationPermissionsShowPrompt instead') Future<GeolocationPermissionShowPromptResponse?> androidOnGeolocationPermissionsShowPrompt(
    1. InAppWebViewController controller,
    2. String origin
    )?,
  11. @Deprecated('Use onPermissionRequest instead') Future<PermissionRequestResponse?> androidOnPermissionRequest(
    1. InAppWebViewController controller,
    2. String origin,
    3. List<String> resources
    )?,
  12. @Deprecated('Use onSafeBrowsingHit instead') Future<SafeBrowsingResponse?> androidOnSafeBrowsingHit(
    1. InAppWebViewController controller,
    2. Uri url,
    3. SafeBrowsingThreat? threatType
    )?,
  13. InAppWebViewInitialData? initialData,
  14. String? initialFile,
  15. @Deprecated('Use initialSettings instead') InAppWebViewGroupOptions? initialOptions,
  16. InAppWebViewSettings? initialSettings,
  17. URLRequest? initialUrlRequest,
  18. UnmodifiableListView<UserScript>? initialUserScripts,
  19. PullToRefreshController? pullToRefreshController,
  20. FindInteractionController? findInteractionController,
  21. ContextMenu? contextMenu,
  22. void onPageCommitVisible(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  23. void onTitleChanged(
    1. InAppWebViewController controller,
    2. String? title
    )?,
  24. @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') void iosOnDidReceiveServerRedirectForProvisionalNavigation(
    1. InAppWebViewController controller
    )?,
  25. @Deprecated('Use onWebContentProcessDidTerminate instead') void iosOnWebContentProcessDidTerminate(
    1. InAppWebViewController controller
    )?,
  26. @Deprecated('Use onNavigationResponse instead') Future<IOSNavigationResponseAction?> iosOnNavigationResponse(
    1. InAppWebViewController controller,
    2. IOSWKNavigationResponse navigationResponse
    )?,
  27. @Deprecated('Use shouldAllowDeprecatedTLS instead') Future<IOSShouldAllowDeprecatedTLSAction?> iosShouldAllowDeprecatedTLS(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  28. Future<AjaxRequestAction> onAjaxProgress(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  29. Future<AjaxRequestAction?> onAjaxReadyStateChange(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  30. void onConsoleMessage(
    1. InAppWebViewController controller,
    2. ConsoleMessage consoleMessage
    )?,
  31. Future<bool?> onCreateWindow(
    1. InAppWebViewController controller,
    2. CreateWindowAction createWindowAction
    )?,
  32. void onCloseWindow(
    1. InAppWebViewController controller
    )?,
  33. void onWindowFocus(
    1. InAppWebViewController controller
    )?,
  34. void onWindowBlur(
    1. InAppWebViewController controller
    )?,
  35. @Deprecated('Use onReceivedIcon instead') void androidOnReceivedIcon(
    1. InAppWebViewController controller,
    2. Uint8List icon
    )?,
  36. @Deprecated('Use onReceivedTouchIconUrl instead') void androidOnReceivedTouchIconUrl(
    1. InAppWebViewController controller,
    2. Uri url,
    3. bool precomposed
    )?,
  37. @Deprecated('Use onDownloadStartRequest instead') void onDownloadStart(
    1. InAppWebViewController controller,
    2. Uri url
    )?,
  38. void onDownloadStartRequest(
    1. InAppWebViewController controller,
    2. DownloadStartRequest downloadStartRequest
    )?,
  39. @Deprecated('Use FindInteractionController.onFindResultReceived instead') void onFindResultReceived(
    1. InAppWebViewController controller,
    2. int activeMatchOrdinal,
    3. int numberOfMatches,
    4. bool isDoneCounting,
    )?,
  40. Future<JsAlertResponse?> onJsAlert(
    1. InAppWebViewController controller,
    2. JsAlertRequest jsAlertRequest
    )?,
  41. Future<JsConfirmResponse?> onJsConfirm(
    1. InAppWebViewController controller,
    2. JsConfirmRequest jsConfirmRequest
    )?,
  42. Future<JsPromptResponse?> onJsPrompt(
    1. InAppWebViewController controller,
    2. JsPromptRequest jsPromptRequest
    )?,
  43. @Deprecated("Use onReceivedError instead") void onLoadError(
    1. InAppWebViewController controller,
    2. Uri? url,
    3. int code,
    4. String message,
    )?,
  44. void onReceivedError(
    1. InAppWebViewController controller,
    2. WebResourceRequest request,
    3. WebResourceError error
    )?,
  45. @Deprecated("Use onReceivedHttpError instead") void onLoadHttpError(
    1. InAppWebViewController controller,
    2. Uri? url,
    3. int statusCode,
    4. String description,
    )?,
  46. void onReceivedHttpError(
    1. InAppWebViewController controller,
    2. WebResourceRequest request,
    3. WebResourceResponse errorResponse
    )?,
  47. void onLoadResource(
    1. InAppWebViewController controller,
    2. LoadedResource resource
    )?,
  48. @Deprecated('Use onLoadResourceWithCustomScheme instead') Future<CustomSchemeResponse?> onLoadResourceCustomScheme(
    1. InAppWebViewController controller,
    2. Uri url
    )?,
  49. Future<CustomSchemeResponse?> onLoadResourceWithCustomScheme(
    1. InAppWebViewController controller,
    2. WebResourceRequest request
    )?,
  50. void onLoadStart(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  51. void onLoadStop(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  52. void onLongPressHitTestResult(
    1. InAppWebViewController controller,
    2. InAppWebViewHitTestResult hitTestResult
    )?,
  53. @Deprecated("Use onPrintRequest instead") void onPrint(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  54. Future<bool?> onPrintRequest(
    1. InAppWebViewController controller,
    2. WebUri? url,
    3. PlatformPrintJobController? printJobController
    )?,
  55. void onProgressChanged(
    1. InAppWebViewController controller,
    2. int progress
    )?,
  56. Future<ClientCertResponse?> onReceivedClientCertRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  57. Future<HttpAuthResponse?> onReceivedHttpAuthRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  58. Future<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  59. void onScrollChanged(
    1. InAppWebViewController controller,
    2. int x,
    3. int y
    )?,
  60. void onUpdateVisitedHistory(
    1. InAppWebViewController controller,
    2. WebUri? url,
    3. bool? isReload
    )?,
  61. void onWebViewCreated(
    1. InAppWebViewController controller
    )?,
  62. Future<AjaxRequest?> shouldInterceptAjaxRequest(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  63. Future<FetchRequest?> shouldInterceptFetchRequest(
    1. InAppWebViewController controller,
    2. FetchRequest fetchRequest
    )?,
  64. Future<NavigationActionPolicy?> shouldOverrideUrlLoading(
    1. InAppWebViewController controller,
    2. NavigationAction navigationAction
    )?,
  65. void onEnterFullscreen(
    1. InAppWebViewController controller
    )?,
  66. void onExitFullscreen(
    1. InAppWebViewController controller
    )?,
  67. void onOverScrolled(
    1. InAppWebViewController controller,
    2. int x,
    3. int y,
    4. bool clampedX,
    5. bool clampedY,
    )?,
  68. void onZoomScaleChanged(
    1. InAppWebViewController controller,
    2. double oldScale,
    3. double newScale
    )?,
  69. @Deprecated('Use shouldInterceptRequest instead') Future<WebResourceResponse?> androidShouldInterceptRequest(
    1. InAppWebViewController controller,
    2. WebResourceRequest request
    )?,
  70. @Deprecated('Use onRenderProcessUnresponsive instead') Future<WebViewRenderProcessAction?> androidOnRenderProcessUnresponsive(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  71. @Deprecated('Use onRenderProcessResponsive instead') Future<WebViewRenderProcessAction?> androidOnRenderProcessResponsive(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  72. @Deprecated('Use onRenderProcessGone instead') void androidOnRenderProcessGone(
    1. InAppWebViewController controller,
    2. RenderProcessGoneDetail detail
    )?,
  73. @Deprecated('Use onFormResubmission instead') Future<FormResubmissionAction?> androidOnFormResubmission(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  74. @Deprecated('Use onZoomScaleChanged instead') void androidOnScaleChanged(
    1. InAppWebViewController controller,
    2. double oldScale,
    3. double newScale
    )?,
  75. @Deprecated('Use onJsBeforeUnload instead') Future<JsBeforeUnloadResponse?> androidOnJsBeforeUnload(
    1. InAppWebViewController controller,
    2. JsBeforeUnloadRequest jsBeforeUnloadRequest
    )?,
  76. @Deprecated('Use onReceivedLoginRequest instead') void androidOnReceivedLoginRequest(
    1. InAppWebViewController controller,
    2. LoginRequest loginRequest
    )?,
  77. void onDidReceiveServerRedirectForProvisionalNavigation(
    1. InAppWebViewController controller
    )?,
  78. Future<FormResubmissionAction?> onFormResubmission(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  79. void onGeolocationPermissionsHidePrompt(
    1. InAppWebViewController controller
    )?,
  80. Future<GeolocationPermissionShowPromptResponse?> onGeolocationPermissionsShowPrompt(
    1. InAppWebViewController controller,
    2. String origin
    )?,
  81. Future<JsBeforeUnloadResponse?> onJsBeforeUnload(
    1. InAppWebViewController controller,
    2. JsBeforeUnloadRequest jsBeforeUnloadRequest
    )?,
  82. Future<NavigationResponseAction?> onNavigationResponse(
    1. InAppWebViewController controller,
    2. NavigationResponse navigationResponse
    )?,
  83. Future<PermissionResponse?> onPermissionRequest(
    1. InAppWebViewController controller,
    2. PermissionRequest permissionRequest
    )?,
  84. void onReceivedIcon(
    1. InAppWebViewController controller,
    2. Uint8List icon
    )?,
  85. void onReceivedLoginRequest(
    1. InAppWebViewController controller,
    2. LoginRequest loginRequest
    )?,
  86. void onPermissionRequestCanceled(
    1. InAppWebViewController controller,
    2. PermissionRequest permissionRequest
    )?,
  87. void onRequestFocus(
    1. InAppWebViewController controller
    )?,
  88. void onReceivedTouchIconUrl(
    1. InAppWebViewController controller,
    2. WebUri url,
    3. bool precomposed
    )?,
  89. void onRenderProcessGone(
    1. InAppWebViewController controller,
    2. RenderProcessGoneDetail detail
    )?,
  90. Future<WebViewRenderProcessAction?> onRenderProcessResponsive(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  91. Future<WebViewRenderProcessAction?> onRenderProcessUnresponsive(
    1. InAppWebViewController controller,
    2. WebUri? url
    )?,
  92. Future<SafeBrowsingResponse?> onSafeBrowsingHit(
    1. InAppWebViewController controller,
    2. WebUri url,
    3. SafeBrowsingThreat? threatType
    )?,
  93. void onWebContentProcessDidTerminate(
    1. InAppWebViewController controller
    )?,
  94. Future<ShouldAllowDeprecatedTLSAction?> shouldAllowDeprecatedTLS(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  95. Future<WebResourceResponse?> shouldInterceptRequest(
    1. InAppWebViewController controller,
    2. WebResourceRequest request
    )?,
  96. Future<void> onCameraCaptureStateChanged(
    1. InAppWebViewController controller,
    2. MediaCaptureState? oldState,
    3. MediaCaptureState? newState
    )?,
  97. Future<void> onMicrophoneCaptureStateChanged(
    1. InAppWebViewController controller,
    2. MediaCaptureState? oldState,
    3. MediaCaptureState? newState
    )?,
  98. void onContentSizeChanged(
    1. InAppWebViewController controller,
    2. Size oldContentSize,
    3. Size newContentSize
    )?,
})

Flutter Widget for adding an inline native WebView integrated in the flutter widget tree.

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • Web
  • Windows

Implementation

InAppWebView({
  Key? key,
  Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  int? windowId,
  HeadlessInAppWebView? headlessWebView,
  InAppWebViewKeepAlive? keepAlive,
  bool? preventGestureDelay,
  TextDirection? layoutDirection,
  WebViewEnvironment? webViewEnvironment,
  @Deprecated('Use onGeolocationPermissionsHidePrompt instead')
  void Function(InAppWebViewController controller)?
      androidOnGeolocationPermissionsHidePrompt,
  @Deprecated('Use onGeolocationPermissionsShowPrompt instead')
  Future<GeolocationPermissionShowPromptResponse?> Function(
          InAppWebViewController controller, String origin)?
      androidOnGeolocationPermissionsShowPrompt,
  @Deprecated('Use onPermissionRequest instead')
  Future<PermissionRequestResponse?> Function(
          InAppWebViewController controller,
          String origin,
          List<String> resources)?
      androidOnPermissionRequest,
  @Deprecated('Use onSafeBrowsingHit instead')
  Future<SafeBrowsingResponse?> Function(InAppWebViewController controller,
          Uri url, SafeBrowsingThreat? threatType)?
      androidOnSafeBrowsingHit,
  InAppWebViewInitialData? initialData,
  String? initialFile,
  @Deprecated('Use initialSettings instead')
  InAppWebViewGroupOptions? initialOptions,
  InAppWebViewSettings? initialSettings,
  URLRequest? initialUrlRequest,
  UnmodifiableListView<UserScript>? initialUserScripts,
  PullToRefreshController? pullToRefreshController,
  FindInteractionController? findInteractionController,
  ContextMenu? contextMenu,
  void Function(InAppWebViewController controller, WebUri? url)?
      onPageCommitVisible,
  void Function(InAppWebViewController controller, String? title)?
      onTitleChanged,
  @Deprecated(
      'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
  void Function(InAppWebViewController controller)?
      iosOnDidReceiveServerRedirectForProvisionalNavigation,
  @Deprecated('Use onWebContentProcessDidTerminate instead')
  void Function(InAppWebViewController controller)?
      iosOnWebContentProcessDidTerminate,
  @Deprecated('Use onNavigationResponse instead')
  Future<IOSNavigationResponseAction?> Function(
          InAppWebViewController controller,
          IOSWKNavigationResponse navigationResponse)?
      iosOnNavigationResponse,
  @Deprecated('Use shouldAllowDeprecatedTLS instead')
  Future<IOSShouldAllowDeprecatedTLSAction?> Function(
          InAppWebViewController controller,
          URLAuthenticationChallenge challenge)?
      iosShouldAllowDeprecatedTLS,
  Future<AjaxRequestAction> Function(
          InAppWebViewController controller, AjaxRequest ajaxRequest)?
      onAjaxProgress,
  Future<AjaxRequestAction?> Function(
          InAppWebViewController controller, AjaxRequest ajaxRequest)?
      onAjaxReadyStateChange,
  void Function(
          InAppWebViewController controller, ConsoleMessage consoleMessage)?
      onConsoleMessage,
  Future<bool?> Function(InAppWebViewController controller,
          CreateWindowAction createWindowAction)?
      onCreateWindow,
  void Function(InAppWebViewController controller)? onCloseWindow,
  void Function(InAppWebViewController controller)? onWindowFocus,
  void Function(InAppWebViewController controller)? onWindowBlur,
  @Deprecated('Use onReceivedIcon instead')
  void Function(InAppWebViewController controller, Uint8List icon)?
      androidOnReceivedIcon,
  @Deprecated('Use onReceivedTouchIconUrl instead')
  void Function(InAppWebViewController controller, Uri url, bool precomposed)?
      androidOnReceivedTouchIconUrl,
  @Deprecated('Use onDownloadStartRequest instead')
  void Function(InAppWebViewController controller, Uri url)? onDownloadStart,
  void Function(InAppWebViewController controller,
          DownloadStartRequest downloadStartRequest)?
      onDownloadStartRequest,
  @Deprecated('Use FindInteractionController.onFindResultReceived instead')
  void Function(InAppWebViewController controller, int activeMatchOrdinal,
          int numberOfMatches, bool isDoneCounting)?
      onFindResultReceived,
  Future<JsAlertResponse?> Function(
          InAppWebViewController controller, JsAlertRequest jsAlertRequest)?
      onJsAlert,
  Future<JsConfirmResponse?> Function(InAppWebViewController controller,
          JsConfirmRequest jsConfirmRequest)?
      onJsConfirm,
  Future<JsPromptResponse?> Function(
          InAppWebViewController controller, JsPromptRequest jsPromptRequest)?
      onJsPrompt,
  @Deprecated("Use onReceivedError instead")
  void Function(InAppWebViewController controller, Uri? url, int code,
          String message)?
      onLoadError,
  void Function(InAppWebViewController controller, WebResourceRequest request,
          WebResourceError error)?
      onReceivedError,
  @Deprecated("Use onReceivedHttpError instead")
  void Function(InAppWebViewController controller, Uri? url, int statusCode,
          String description)?
      onLoadHttpError,
  void Function(InAppWebViewController controller, WebResourceRequest request,
          WebResourceResponse errorResponse)?
      onReceivedHttpError,
  void Function(InAppWebViewController controller, LoadedResource resource)?
      onLoadResource,
  @Deprecated('Use onLoadResourceWithCustomScheme instead')
  Future<CustomSchemeResponse?> Function(
          InAppWebViewController controller, Uri url)?
      onLoadResourceCustomScheme,
  Future<CustomSchemeResponse?> Function(
          InAppWebViewController controller, WebResourceRequest request)?
      onLoadResourceWithCustomScheme,
  void Function(InAppWebViewController controller, WebUri? url)? onLoadStart,
  void Function(InAppWebViewController controller, WebUri? url)? onLoadStop,
  void Function(InAppWebViewController controller,
          InAppWebViewHitTestResult hitTestResult)?
      onLongPressHitTestResult,
  @Deprecated("Use onPrintRequest instead")
  void Function(InAppWebViewController controller, Uri? url)? onPrint,
  Future<bool?> Function(InAppWebViewController controller, WebUri? url,
          PlatformPrintJobController? printJobController)?
      onPrintRequest,
  void Function(InAppWebViewController controller, int progress)?
      onProgressChanged,
  Future<ClientCertResponse?> Function(InAppWebViewController controller,
          URLAuthenticationChallenge challenge)?
      onReceivedClientCertRequest,
  Future<HttpAuthResponse?> Function(InAppWebViewController controller,
          URLAuthenticationChallenge challenge)?
      onReceivedHttpAuthRequest,
  Future<ServerTrustAuthResponse?> Function(InAppWebViewController controller,
          URLAuthenticationChallenge challenge)?
      onReceivedServerTrustAuthRequest,
  void Function(InAppWebViewController controller, int x, int y)?
      onScrollChanged,
  void Function(
          InAppWebViewController controller, WebUri? url, bool? isReload)?
      onUpdateVisitedHistory,
  void Function(InAppWebViewController controller)? onWebViewCreated,
  Future<AjaxRequest?> Function(
          InAppWebViewController controller, AjaxRequest ajaxRequest)?
      shouldInterceptAjaxRequest,
  Future<FetchRequest?> Function(
          InAppWebViewController controller, FetchRequest fetchRequest)?
      shouldInterceptFetchRequest,
  Future<NavigationActionPolicy?> Function(InAppWebViewController controller,
          NavigationAction navigationAction)?
      shouldOverrideUrlLoading,
  void Function(InAppWebViewController controller)? onEnterFullscreen,
  void Function(InAppWebViewController controller)? onExitFullscreen,
  void Function(InAppWebViewController controller, int x, int y,
          bool clampedX, bool clampedY)?
      onOverScrolled,
  void Function(InAppWebViewController controller, double oldScale,
          double newScale)?
      onZoomScaleChanged,
  @Deprecated('Use shouldInterceptRequest instead')
  Future<WebResourceResponse?> Function(
          InAppWebViewController controller, WebResourceRequest request)?
      androidShouldInterceptRequest,
  @Deprecated('Use onRenderProcessUnresponsive instead')
  Future<WebViewRenderProcessAction?> Function(
          InAppWebViewController controller, Uri? url)?
      androidOnRenderProcessUnresponsive,
  @Deprecated('Use onRenderProcessResponsive instead')
  Future<WebViewRenderProcessAction?> Function(
          InAppWebViewController controller, Uri? url)?
      androidOnRenderProcessResponsive,
  @Deprecated('Use onRenderProcessGone instead')
  void Function(
          InAppWebViewController controller, RenderProcessGoneDetail detail)?
      androidOnRenderProcessGone,
  @Deprecated('Use onFormResubmission instead')
  Future<FormResubmissionAction?> Function(
          InAppWebViewController controller, Uri? url)?
      androidOnFormResubmission,
  @Deprecated('Use onZoomScaleChanged instead')
  void Function(InAppWebViewController controller, double oldScale,
          double newScale)?
      androidOnScaleChanged,
  @Deprecated('Use onJsBeforeUnload instead')
  Future<JsBeforeUnloadResponse?> Function(InAppWebViewController controller,
          JsBeforeUnloadRequest jsBeforeUnloadRequest)?
      androidOnJsBeforeUnload,
  @Deprecated('Use onReceivedLoginRequest instead')
  void Function(InAppWebViewController controller, LoginRequest loginRequest)?
      androidOnReceivedLoginRequest,
  void Function(InAppWebViewController controller)?
      onDidReceiveServerRedirectForProvisionalNavigation,
  Future<FormResubmissionAction?> Function(
          InAppWebViewController controller, WebUri? url)?
      onFormResubmission,
  void Function(InAppWebViewController controller)?
      onGeolocationPermissionsHidePrompt,
  Future<GeolocationPermissionShowPromptResponse?> Function(
          InAppWebViewController controller, String origin)?
      onGeolocationPermissionsShowPrompt,
  Future<JsBeforeUnloadResponse?> Function(InAppWebViewController controller,
          JsBeforeUnloadRequest jsBeforeUnloadRequest)?
      onJsBeforeUnload,
  Future<NavigationResponseAction?> Function(
          InAppWebViewController controller,
          NavigationResponse navigationResponse)?
      onNavigationResponse,
  Future<PermissionResponse?> Function(InAppWebViewController controller,
          PermissionRequest permissionRequest)?
      onPermissionRequest,
  void Function(InAppWebViewController controller, Uint8List icon)?
      onReceivedIcon,
  void Function(InAppWebViewController controller, LoginRequest loginRequest)?
      onReceivedLoginRequest,
  void Function(InAppWebViewController controller,
          PermissionRequest permissionRequest)?
      onPermissionRequestCanceled,
  void Function(InAppWebViewController controller)? onRequestFocus,
  void Function(
          InAppWebViewController controller, WebUri url, bool precomposed)?
      onReceivedTouchIconUrl,
  void Function(
          InAppWebViewController controller, RenderProcessGoneDetail detail)?
      onRenderProcessGone,
  Future<WebViewRenderProcessAction?> Function(
          InAppWebViewController controller, WebUri? url)?
      onRenderProcessResponsive,
  Future<WebViewRenderProcessAction?> Function(
          InAppWebViewController controller, WebUri? url)?
      onRenderProcessUnresponsive,
  Future<SafeBrowsingResponse?> Function(InAppWebViewController controller,
          WebUri url, SafeBrowsingThreat? threatType)?
      onSafeBrowsingHit,
  void Function(InAppWebViewController controller)?
      onWebContentProcessDidTerminate,
  Future<ShouldAllowDeprecatedTLSAction?> Function(
          InAppWebViewController controller,
          URLAuthenticationChallenge challenge)?
      shouldAllowDeprecatedTLS,
  Future<WebResourceResponse?> Function(
          InAppWebViewController controller, WebResourceRequest request)?
      shouldInterceptRequest,
  Future<void> Function(
    InAppWebViewController controller,
    MediaCaptureState? oldState,
    MediaCaptureState? newState,
  )? onCameraCaptureStateChanged,
  Future<void> Function(
    InAppWebViewController controller,
    MediaCaptureState? oldState,
    MediaCaptureState? newState,
  )? onMicrophoneCaptureStateChanged,
  void Function(InAppWebViewController controller, Size oldContentSize,
          Size newContentSize)?
      onContentSizeChanged,
}) : this.fromPlatformCreationParams(
          key: key,
          params: PlatformInAppWebViewWidgetCreationParams(
            controllerFromPlatform:
                (PlatformInAppWebViewController controller) =>
                    InAppWebViewController.fromPlatform(platform: controller),
            windowId: windowId,
            keepAlive: keepAlive,
            initialUrlRequest: initialUrlRequest,
            initialFile: initialFile,
            initialData: initialData,
            initialOptions: initialOptions,
            initialSettings: initialSettings,
            initialUserScripts: initialUserScripts,
            pullToRefreshController: pullToRefreshController?.platform,
            findInteractionController: findInteractionController?.platform,
            contextMenu: contextMenu,
            layoutDirection: layoutDirection,
            webViewEnvironment: webViewEnvironment?.platform,
            onWebViewCreated: onWebViewCreated != null
                ? (controller) => onWebViewCreated.call(controller)
                : null,
            onLoadStart: onLoadStart != null
                ? (controller, url) => onLoadStart.call(controller, url)
                : null,
            onLoadStop: onLoadStop != null
                ? (controller, url) => onLoadStop.call(controller, url)
                : null,
            onLoadError: onLoadError != null
                ? (controller, url, code, message) =>
                    onLoadError.call(controller, url, code, message)
                : null,
            onReceivedError: onReceivedError != null
                ? (controller, request, error) =>
                    onReceivedError.call(controller, request, error)
                : null,
            onLoadHttpError: onLoadHttpError != null
                ? (controller, url, statusCode, description) =>
                    onLoadHttpError.call(
                        controller, url, statusCode, description)
                : null,
            onReceivedHttpError: onReceivedHttpError != null
                ? (controller, request, errorResponse) => onReceivedHttpError
                    .call(controller, request, errorResponse)
                : null,
            onConsoleMessage: onConsoleMessage != null
                ? (controller, consoleMessage) =>
                    onConsoleMessage.call(controller, consoleMessage)
                : null,
            onProgressChanged: onProgressChanged != null
                ? (controller, progress) =>
                    onProgressChanged.call(controller, progress)
                : null,
            shouldOverrideUrlLoading: shouldOverrideUrlLoading != null
                ? (controller, navigationAction) =>
                    shouldOverrideUrlLoading(controller, navigationAction)
                : null,
            onLoadResource: onLoadResource != null
                ? (controller, resource) =>
                    onLoadResource.call(controller, resource)
                : null,
            onScrollChanged: onScrollChanged != null
                ? (controller, x, y) => onScrollChanged.call(controller, x, y)
                : null,
            onDownloadStart: onDownloadStart != null
                ? (controller, url) => onDownloadStart.call(controller, url)
                : null,
            onDownloadStartRequest: onDownloadStartRequest != null
                ? (controller, downloadStartRequest) => onDownloadStartRequest
                    .call(controller, downloadStartRequest)
                : null,
            onLoadResourceCustomScheme: onLoadResourceCustomScheme != null
                ? (controller, url) =>
                    onLoadResourceCustomScheme.call(controller, url)
                : null,
            onLoadResourceWithCustomScheme: onLoadResourceWithCustomScheme !=
                    null
                ? (controller, request) =>
                    onLoadResourceWithCustomScheme.call(controller, request)
                : null,
            onCreateWindow: onCreateWindow != null
                ? (controller, createWindowAction) =>
                    onCreateWindow.call(controller, createWindowAction)
                : null,
            onCloseWindow: onCloseWindow != null
                ? (controller) => onCloseWindow.call(controller)
                : null,
            onJsAlert: onJsAlert != null
                ? (controller, jsAlertRequest) =>
                    onJsAlert.call(controller, jsAlertRequest)
                : null,
            onJsConfirm: onJsConfirm != null
                ? (controller, jsConfirmRequest) =>
                    onJsConfirm.call(controller, jsConfirmRequest)
                : null,
            onJsPrompt: onJsPrompt != null
                ? (controller, jsPromptRequest) =>
                    onJsPrompt.call(controller, jsPromptRequest)
                : null,
            onReceivedHttpAuthRequest: onReceivedHttpAuthRequest != null
                ? (controller, challenge) =>
                    onReceivedHttpAuthRequest.call(controller, challenge)
                : null,
            onReceivedServerTrustAuthRequest:
                onReceivedServerTrustAuthRequest != null
                    ? (controller, challenge) =>
                        onReceivedServerTrustAuthRequest.call(
                            controller, challenge)
                    : null,
            onReceivedClientCertRequest: onReceivedClientCertRequest != null
                ? (controller, challenge) =>
                    onReceivedClientCertRequest.call(controller, challenge)
                : null,
            onFindResultReceived: onFindResultReceived != null
                ? (controller, activeMatchOrdinal, numberOfMatches,
                        isDoneCounting) =>
                    onFindResultReceived.call(controller, activeMatchOrdinal,
                        numberOfMatches, isDoneCounting)
                : null,
            shouldInterceptAjaxRequest: shouldInterceptAjaxRequest != null
                ? (controller, ajaxRequest) =>
                    shouldInterceptAjaxRequest.call(controller, ajaxRequest)
                : null,
            onAjaxReadyStateChange: onAjaxReadyStateChange != null
                ? (controller, ajaxRequest) =>
                    onAjaxReadyStateChange.call(controller, ajaxRequest)
                : null,
            onAjaxProgress: onAjaxProgress != null
                ? (controller, ajaxRequest) =>
                    onAjaxProgress.call(controller, ajaxRequest)
                : null,
            shouldInterceptFetchRequest: shouldInterceptFetchRequest != null
                ? (controller, fetchRequest) =>
                    shouldInterceptFetchRequest.call(controller, fetchRequest)
                : null,
            onUpdateVisitedHistory: onUpdateVisitedHistory != null
                ? (controller, url, isReload) =>
                    onUpdateVisitedHistory.call(controller, url, isReload)
                : null,
            onPrint: onPrint != null
                ? (controller, url) => onPrint.call(controller, url)
                : null,
            onPrintRequest: onPrintRequest != null
                ? (controller, url, printJobController) =>
                    onPrintRequest.call(controller, url, printJobController)
                : null,
            onLongPressHitTestResult: onLongPressHitTestResult != null
                ? (controller, hitTestResult) =>
                    onLongPressHitTestResult.call(controller, hitTestResult)
                : null,
            onEnterFullscreen: onEnterFullscreen != null
                ? (controller) => onEnterFullscreen.call(controller)
                : null,
            onExitFullscreen: onExitFullscreen != null
                ? (controller) => onExitFullscreen.call(controller)
                : null,
            onPageCommitVisible: onPageCommitVisible != null
                ? (controller, url) =>
                    onPageCommitVisible.call(controller, url)
                : null,
            onTitleChanged: onTitleChanged != null
                ? (controller, title) =>
                    onTitleChanged.call(controller, title)
                : null,
            onWindowFocus: onWindowFocus != null
                ? (controller) => onWindowFocus.call(controller)
                : null,
            onWindowBlur: onWindowBlur != null
                ? (controller) => onWindowBlur.call(controller)
                : null,
            onOverScrolled: onOverScrolled != null
                ? (controller, x, y, clampedX, clampedY) =>
                    onOverScrolled.call(controller, x, y, clampedX, clampedY)
                : null,
            onZoomScaleChanged: onZoomScaleChanged != null
                ? (controller, oldScale, newScale) =>
                    onZoomScaleChanged.call(controller, oldScale, newScale)
                : null,
            androidOnSafeBrowsingHit: androidOnSafeBrowsingHit != null
                ? (controller, url, threatType) =>
                    androidOnSafeBrowsingHit.call(controller, url, threatType)
                : null,
            onSafeBrowsingHit: onSafeBrowsingHit != null
                ? (controller, url, threatType) =>
                    onSafeBrowsingHit.call(controller, url, threatType)
                : null,
            androidOnPermissionRequest: androidOnPermissionRequest != null
                ? (controller, origin, resources) =>
                    androidOnPermissionRequest.call(
                        controller, origin, resources)
                : null,
            onPermissionRequest: onPermissionRequest != null
                ? (controller, permissionRequest) =>
                    onPermissionRequest.call(controller, permissionRequest)
                : null,
            androidOnGeolocationPermissionsShowPrompt:
                androidOnGeolocationPermissionsShowPrompt != null
                    ? (controller, origin) =>
                        androidOnGeolocationPermissionsShowPrompt.call(
                            controller, origin)
                    : null,
            onGeolocationPermissionsShowPrompt:
                onGeolocationPermissionsShowPrompt != null
                    ? (controller, origin) =>
                        onGeolocationPermissionsShowPrompt.call(
                            controller, origin)
                    : null,
            androidOnGeolocationPermissionsHidePrompt:
                androidOnGeolocationPermissionsHidePrompt != null
                    ? (controller) =>
                        androidOnGeolocationPermissionsHidePrompt
                            .call(controller)
                    : null,
            onGeolocationPermissionsHidePrompt:
                onGeolocationPermissionsHidePrompt != null
                    ? (controller) =>
                        onGeolocationPermissionsHidePrompt.call(controller)
                    : null,
            androidShouldInterceptRequest: androidShouldInterceptRequest !=
                    null
                ? (controller, request) =>
                    androidShouldInterceptRequest.call(controller, request)
                : null,
            shouldInterceptRequest: shouldInterceptRequest != null
                ? (controller, request) =>
                    shouldInterceptRequest.call(controller, request)
                : null,
            androidOnRenderProcessGone: androidOnRenderProcessGone != null
                ? (controller, detail) =>
                    androidOnRenderProcessGone.call(controller, detail)
                : null,
            onRenderProcessGone: onRenderProcessGone != null
                ? (controller, detail) =>
                    onRenderProcessGone.call(controller, detail)
                : null,
            androidOnRenderProcessResponsive:
                androidOnRenderProcessResponsive != null
                    ? (controller, url) =>
                        androidOnRenderProcessResponsive.call(controller, url)
                    : null,
            onRenderProcessResponsive: onRenderProcessResponsive != null
                ? (controller, url) =>
                    onRenderProcessResponsive.call(controller, url)
                : null,
            androidOnRenderProcessUnresponsive:
                androidOnRenderProcessUnresponsive != null
                    ? (controller, url) => androidOnRenderProcessUnresponsive
                        .call(controller, url)
                    : null,
            onRenderProcessUnresponsive: onRenderProcessUnresponsive != null
                ? (controller, url) =>
                    onRenderProcessUnresponsive.call(controller, url)
                : null,
            androidOnFormResubmission: androidOnFormResubmission != null
                ? (controller, url) =>
                    androidOnFormResubmission.call(controller, url)
                : null,
            onFormResubmission: onFormResubmission != null
                ? (controller, url) =>
                    onFormResubmission.call(controller, url)
                : null,
            androidOnScaleChanged: androidOnScaleChanged != null
                ? (controller, oldScale, newScale) =>
                    androidOnScaleChanged.call(controller, oldScale, newScale)
                : null,
            androidOnReceivedIcon: androidOnReceivedIcon != null
                ? (controller, icon) =>
                    androidOnReceivedIcon.call(controller, icon)
                : null,
            onReceivedIcon: onReceivedIcon != null
                ? (controller, icon) => onReceivedIcon.call(controller, icon)
                : null,
            androidOnReceivedTouchIconUrl:
                androidOnReceivedTouchIconUrl != null
                    ? (controller, url, precomposed) =>
                        androidOnReceivedTouchIconUrl.call(
                            controller, url, precomposed)
                    : null,
            onReceivedTouchIconUrl: onReceivedTouchIconUrl != null
                ? (controller, url, precomposed) =>
                    onReceivedTouchIconUrl.call(controller, url, precomposed)
                : null,
            androidOnJsBeforeUnload: androidOnJsBeforeUnload != null
                ? (controller, jsBeforeUnloadRequest) =>
                    androidOnJsBeforeUnload.call(
                        controller, jsBeforeUnloadRequest)
                : null,
            onJsBeforeUnload: onJsBeforeUnload != null
                ? (controller, jsBeforeUnloadRequest) =>
                    onJsBeforeUnload.call(controller, jsBeforeUnloadRequest)
                : null,
            androidOnReceivedLoginRequest: androidOnReceivedLoginRequest !=
                    null
                ? (controller, loginRequest) => androidOnReceivedLoginRequest
                    .call(controller, loginRequest)
                : null,
            onReceivedLoginRequest: onReceivedLoginRequest != null
                ? (controller, loginRequest) =>
                    onReceivedLoginRequest.call(controller, loginRequest)
                : null,
            onPermissionRequestCanceled: onPermissionRequestCanceled != null
                ? (controller, permissionRequest) =>
                    onPermissionRequestCanceled.call(
                        controller, permissionRequest)
                : null,
            onRequestFocus: onRequestFocus != null
                ? (controller) => onRequestFocus.call(controller)
                : null,
            iosOnWebContentProcessDidTerminate:
                iosOnWebContentProcessDidTerminate != null
                    ? (controller) =>
                        iosOnWebContentProcessDidTerminate.call(controller)
                    : null,
            onWebContentProcessDidTerminate:
                onWebContentProcessDidTerminate != null
                    ? (controller) =>
                        onWebContentProcessDidTerminate.call(controller)
                    : null,
            iosOnDidReceiveServerRedirectForProvisionalNavigation:
                iosOnDidReceiveServerRedirectForProvisionalNavigation != null
                    ? (controller) =>
                        iosOnDidReceiveServerRedirectForProvisionalNavigation
                            .call(controller)
                    : null,
            onDidReceiveServerRedirectForProvisionalNavigation:
                onDidReceiveServerRedirectForProvisionalNavigation != null
                    ? (controller) =>
                        onDidReceiveServerRedirectForProvisionalNavigation
                            .call(controller)
                    : null,
            iosOnNavigationResponse: iosOnNavigationResponse != null
                ? (controller, navigationResponse) => iosOnNavigationResponse
                    .call(controller, navigationResponse)
                : null,
            onNavigationResponse: onNavigationResponse != null
                ? (controller, navigationResponse) =>
                    onNavigationResponse.call(controller, navigationResponse)
                : null,
            iosShouldAllowDeprecatedTLS: iosShouldAllowDeprecatedTLS != null
                ? (controller, challenge) =>
                    iosShouldAllowDeprecatedTLS.call(controller, challenge)
                : null,
            shouldAllowDeprecatedTLS: shouldAllowDeprecatedTLS != null
                ? (controller, challenge) =>
                    shouldAllowDeprecatedTLS.call(controller, challenge)
                : null,
            onCameraCaptureStateChanged: onCameraCaptureStateChanged != null
                ? (controller, oldState, newState) =>
                    onCameraCaptureStateChanged.call(
                        controller, oldState, newState)
                : null,
            onMicrophoneCaptureStateChanged:
                onMicrophoneCaptureStateChanged != null
                    ? (controller, oldState, newState) =>
                        onMicrophoneCaptureStateChanged.call(
                            controller, oldState, newState)
                    : null,
            onContentSizeChanged: onContentSizeChanged != null
                ? (controller, oldContentSize, newContentSize) =>
                    onContentSizeChanged.call(
                        controller, oldContentSize, newContentSize)
                : null,
            gestureRecognizers: gestureRecognizers,
            headlessWebView: headlessWebView?.platform,
            preventGestureDelay: preventGestureDelay,
          ));