WebViewPermissionRequest class

Permissions request when web content requests access to protected resources.

A response MUST be provided by calling grant, deny, or a method from platform.

Platform-Specific Features

This class contains an underlying implementation provided by the current platform. Once a platform implementation is imported, the example below can be followed to use features provided by a platform's implementation.

Below is an example of accessing the platform-specific implementation for iOS and Android:

final WebViewPermissionRequest request = ...;

if (WebViewPlatform.instance is WebKitWebViewPlatform) {
  final WebKitWebViewPermissionRequest webKitRequest =
      request.platform as WebKitWebViewPermissionRequest;
} else if (WebViewPlatform.instance is AndroidWebViewPlatform) {
  final AndroidWebViewPermissionRequest androidRequest =
      request.platform as AndroidWebViewPermissionRequest;
}
Annotations

Properties

hashCode int
The hash code for this object.
no setterinherited
platform PlatformWebViewPermissionRequest
Implementation of PlatformWebViewPermissionRequest for the current platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
types Set<WebViewPermissionResourceType>
All resources access has been requested for.
final

Methods

deny() Future<void>
Deny permission for the requested resource(s).
grant() Future<void>
Grant permission for the requested resource(s).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited