WebViewController constructor

WebViewController({
  1. void onPermissionRequest(
    1. WebViewPermissionRequest request
    )?,
})

Constructs a WebViewController.

onPermissionRequest: A callback that notifies the host application that web content is requesting permission to access the specified resources. To grant access for a device resource, most platforms will need to update their app configurations for the relevant system resource.

For Android, you will need to update your AndroidManifest.xml. See https://developer.android.com/training/permissions/declaring

For iOS, you will need to update your Info.plist. See https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources?language=objc.

See WebViewController.fromPlatformCreationParams for setting parameters for a specific platform.

Implementation

WebViewController({
  void Function(WebViewPermissionRequest request)? onPermissionRequest,
}) : this.fromPlatformCreationParams(
        const PlatformWebViewControllerCreationParams(),
        onPermissionRequest: onPermissionRequest,
      );