onPermissionRequest property

Future<PermissionResponse?> Function(T controller, PermissionRequest permissionRequest)? onPermissionRequest
final

Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied.

permissionRequest represents the permission request with an array of resources the web content wants to access and the origin of the web page which is trying to access the restricted resources.

NOTE for Android: available only on Android 21+.

NOTE for iOS: available only on iOS 15.0+. The default PermissionResponse.action is PermissionResponseAction.PROMPT.

NOTE for MacOS: available only on iOS 12.0+. The default PermissionResponse.action is PermissionResponseAction.PROMPT.

Officially Supported Platforms/Implementations:

Implementation

final Future<PermissionResponse?> Function(
    T controller, PermissionRequest permissionRequest)? onPermissionRequest;