query method Null safety

Promise<PermissionStatus> query(
  1. dynamic permissionDesc
)

Returns the user permission status for a given API. navigator.permissions.query(PermissionDescriptor).then(function(permissionStatus) { ... }) navigator.permissions.query({name:'geolocation'}).then(function(result) { if (result.state == 'granted') { showLocalNewsWithGeolocation(); } else if (result.state == 'prompt') { showButtonToEnableLocalNews(); } // Don't do anything if the permission was denied. });

Implementation

external Promise<PermissionStatus> query(dynamic permissionDesc);