PermissionRequester typedef

PermissionRequester = Future<void> Function(List<Permission> permissions)

Asks the user for permissions and completes once done.

Lets an app take over how permissions are requested - e.g., to show a rationale before each system dialog. See SmartPhoneClientManager.configure.

Whatever the user answers, CAMS re-checks the actual permission status afterwards, so a requester never needs to report back.

A requester runs inside the permission queue, so it must call permission_handler directly and never SmartPhoneClientManager.requestPermissions - that would wait on itself.

Implementation

typedef PermissionRequester =
    Future<void> Function(List<Permission> permissions);