InAppWebView constructor

const InAppWebView({
  1. Key? key,
  2. int? windowId,
  3. URLRequest? initialUrlRequest,
  4. String? initialFile,
  5. InAppWebViewInitialData? initialData,
  6. InAppWebViewGroupOptions? initialOptions,
  7. UnmodifiableListView<UserScript>? initialUserScripts,
  8. PullToRefreshController? pullToRefreshController,
  9. WebViewImplementation implementation = WebViewImplementation.NATIVE,
  10. ContextMenu? contextMenu,
  11. void onWebViewCreated(
    1. InAppWebViewController controller
    )?,
  12. void onLoadStart(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  13. void onLoadStop(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  14. void onLoadError(
    1. InAppWebViewController controller,
    2. Uri? url,
    3. int code,
    4. String message,
    )?,
  15. void onLoadHttpError(
    1. InAppWebViewController controller,
    2. Uri? url,
    3. int statusCode,
    4. String description,
    )?,
  16. void onConsoleMessage(
    1. InAppWebViewController controller,
    2. ConsoleMessage consoleMessage
    )?,
  17. void onProgressChanged(
    1. InAppWebViewController controller,
    2. int progress
    )?,
  18. Future<NavigationActionPolicy?> shouldOverrideUrlLoading(
    1. InAppWebViewController controller,
    2. NavigationAction navigationAction
    )?,
  19. void onLoadResource(
    1. InAppWebViewController controller,
    2. LoadedResource resource
    )?,
  20. void onScrollChanged(
    1. InAppWebViewController controller,
    2. int x,
    3. int y
    )?,
  21. @Deprecated('Use `onDownloadStartRequest` instead') void onDownloadStart(
    1. InAppWebViewController controller,
    2. Uri url
    )?,
  22. void onDownloadStartRequest(
    1. InAppWebViewController controller,
    2. DownloadStartRequest downloadStartRequest
    )?,
  23. Future<CustomSchemeResponse?> onLoadResourceCustomScheme(
    1. InAppWebViewController controller,
    2. Uri url
    )?,
  24. Future<bool?> onCreateWindow(
    1. InAppWebViewController controller,
    2. CreateWindowAction createWindowAction
    )?,
  25. void onCloseWindow(
    1. InAppWebViewController controller
    )?,
  26. Future<JsAlertResponse?> onJsAlert(
    1. InAppWebViewController controller,
    2. JsAlertRequest jsAlertRequest
    )?,
  27. Future<JsConfirmResponse?> onJsConfirm(
    1. InAppWebViewController controller,
    2. JsConfirmRequest jsConfirmRequest
    )?,
  28. Future<JsPromptResponse?> onJsPrompt(
    1. InAppWebViewController controller,
    2. JsPromptRequest jsPromptRequest
    )?,
  29. Future<HttpAuthResponse?> onReceivedHttpAuthRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  30. Future<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  31. Future<ClientCertResponse?> onReceivedClientCertRequest(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  32. void onFindResultReceived(
    1. InAppWebViewController controller,
    2. int activeMatchOrdinal,
    3. int numberOfMatches,
    4. bool isDoneCounting,
    )?,
  33. Future<AjaxRequest?> shouldInterceptAjaxRequest(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  34. Future<AjaxRequestAction?> onAjaxReadyStateChange(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  35. Future<AjaxRequestAction> onAjaxProgress(
    1. InAppWebViewController controller,
    2. AjaxRequest ajaxRequest
    )?,
  36. Future<FetchRequest?> shouldInterceptFetchRequest(
    1. InAppWebViewController controller,
    2. FetchRequest fetchRequest
    )?,
  37. void onUpdateVisitedHistory(
    1. InAppWebViewController controller,
    2. Uri? url,
    3. bool? androidIsReload
    )?,
  38. void onPrint(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  39. void onLongPressHitTestResult(
    1. InAppWebViewController controller,
    2. InAppWebViewHitTestResult hitTestResult
    )?,
  40. void onEnterFullscreen(
    1. InAppWebViewController controller
    )?,
  41. void onExitFullscreen(
    1. InAppWebViewController controller
    )?,
  42. void onPageCommitVisible(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  43. void onTitleChanged(
    1. InAppWebViewController controller,
    2. String? title
    )?,
  44. void onWindowFocus(
    1. InAppWebViewController controller
    )?,
  45. void onWindowBlur(
    1. InAppWebViewController controller
    )?,
  46. void onOverScrolled(
    1. InAppWebViewController controller,
    2. int x,
    3. int y,
    4. bool clampedX,
    5. bool clampedY,
    )?,
  47. void onZoomScaleChanged(
    1. InAppWebViewController controller,
    2. double oldScale,
    3. double newScale
    )?,
  48. Future<SafeBrowsingResponse?> androidOnSafeBrowsingHit(
    1. InAppWebViewController controller,
    2. Uri url,
    3. SafeBrowsingThreat? threatType
    )?,
  49. Future<PermissionRequestResponse?> androidOnPermissionRequest(
    1. InAppWebViewController controller,
    2. String origin,
    3. List<String> resources
    )?,
  50. Future<GeolocationPermissionShowPromptResponse?> androidOnGeolocationPermissionsShowPrompt(
    1. InAppWebViewController controller,
    2. String origin
    )?,
  51. void androidOnGeolocationPermissionsHidePrompt(
    1. InAppWebViewController controller
    )?,
  52. Future<WebResourceResponse?> androidShouldInterceptRequest(
    1. InAppWebViewController controller,
    2. WebResourceRequest request
    )?,
  53. void androidOnRenderProcessGone(
    1. InAppWebViewController controller,
    2. RenderProcessGoneDetail detail
    )?,
  54. Future<WebViewRenderProcessAction?> androidOnRenderProcessResponsive(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  55. Future<WebViewRenderProcessAction?> androidOnRenderProcessUnresponsive(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  56. Future<FormResubmissionAction?> androidOnFormResubmission(
    1. InAppWebViewController controller,
    2. Uri? url
    )?,
  57. @Deprecated('Use `onZoomScaleChanged` instead') void androidOnScaleChanged(
    1. InAppWebViewController controller,
    2. double oldScale,
    3. double newScale
    )?,
  58. void androidOnReceivedIcon(
    1. InAppWebViewController controller,
    2. Uint8List icon
    )?,
  59. void androidOnReceivedTouchIconUrl(
    1. InAppWebViewController controller,
    2. Uri url,
    3. bool precomposed
    )?,
  60. Future<JsBeforeUnloadResponse?> androidOnJsBeforeUnload(
    1. InAppWebViewController controller,
    2. JsBeforeUnloadRequest jsBeforeUnloadRequest
    )?,
  61. void androidOnReceivedLoginRequest(
    1. InAppWebViewController controller,
    2. LoginRequest loginRequest
    )?,
  62. void iosOnWebContentProcessDidTerminate(
    1. InAppWebViewController controller
    )?,
  63. void iosOnDidReceiveServerRedirectForProvisionalNavigation(
    1. InAppWebViewController controller
    )?,
  64. Future<IOSNavigationResponseAction?> iosOnNavigationResponse(
    1. InAppWebViewController controller,
    2. IOSWKNavigationResponse navigationResponse
    )?,
  65. Future<IOSShouldAllowDeprecatedTLSAction?> iosShouldAllowDeprecatedTLS(
    1. InAppWebViewController controller,
    2. URLAuthenticationChallenge challenge
    )?,
  66. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
})

Implementation

const InAppWebView({
  Key? key,
  this.windowId,
  this.initialUrlRequest,
  this.initialFile,
  this.initialData,
  this.initialOptions,
  this.initialUserScripts,
  this.pullToRefreshController,
  this.implementation = WebViewImplementation.NATIVE,
  this.contextMenu,
  this.onWebViewCreated,
  this.onLoadStart,
  this.onLoadStop,
  this.onLoadError,
  this.onLoadHttpError,
  this.onConsoleMessage,
  this.onProgressChanged,
  this.shouldOverrideUrlLoading,
  this.onLoadResource,
  this.onScrollChanged,
  @Deprecated('Use `onDownloadStartRequest` instead') this.onDownloadStart,
  this.onDownloadStartRequest,
  this.onLoadResourceCustomScheme,
  this.onCreateWindow,
  this.onCloseWindow,
  this.onJsAlert,
  this.onJsConfirm,
  this.onJsPrompt,
  this.onReceivedHttpAuthRequest,
  this.onReceivedServerTrustAuthRequest,
  this.onReceivedClientCertRequest,
  this.onFindResultReceived,
  this.shouldInterceptAjaxRequest,
  this.onAjaxReadyStateChange,
  this.onAjaxProgress,
  this.shouldInterceptFetchRequest,
  this.onUpdateVisitedHistory,
  this.onPrint,
  this.onLongPressHitTestResult,
  this.onEnterFullscreen,
  this.onExitFullscreen,
  this.onPageCommitVisible,
  this.onTitleChanged,
  this.onWindowFocus,
  this.onWindowBlur,
  this.onOverScrolled,
  this.onZoomScaleChanged,
  this.androidOnSafeBrowsingHit,
  this.androidOnPermissionRequest,
  this.androidOnGeolocationPermissionsShowPrompt,
  this.androidOnGeolocationPermissionsHidePrompt,
  this.androidShouldInterceptRequest,
  this.androidOnRenderProcessGone,
  this.androidOnRenderProcessResponsive,
  this.androidOnRenderProcessUnresponsive,
  this.androidOnFormResubmission,
  @Deprecated('Use `onZoomScaleChanged` instead') this.androidOnScaleChanged,
  this.androidOnReceivedIcon,
  this.androidOnReceivedTouchIconUrl,
  this.androidOnJsBeforeUnload,
  this.androidOnReceivedLoginRequest,
  this.iosOnWebContentProcessDidTerminate,
  this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
  this.iosOnNavigationResponse,
  this.iosShouldAllowDeprecatedTLS,
  this.gestureRecognizers,
}) : super(key: key);