androidOnPermissionRequest property

(Future<PermissionRequestResponse?> Function(InAppWebViewController controller, String origin, List<String> resources)?) androidOnPermissionRequest

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

origin represents the origin of the web page which is trying to access the restricted resources.

resources represents the array of resources the web content wants to access.

NOTE: available only on Android 21+.

Official Android API:


final Future<PermissionRequestResponse?> Function(
    InAppWebViewController controller,
    String origin,
    List<String> resources)? androidOnPermissionRequest;