permissionCheck static method
Future<PermissionState>
permissionCheck({
- PermissionRequestOption requestOption = const PermissionRequestOption(),
Request the current PermissionState of required permissions. 请求所需权限的 PermissionState。
Throws a StateError when the state is not PermissionState.authorized or PermissionState.limited, which means the picker can not perform further actions. 当权限状态不是 PermissionState.authorized 或 PermissionState.limited 时, 将抛出 StateError,此时选择器无法执行其他操作。
See also:
- PermissionState which defined all states of required permissions.
Implementation
static Future<PermissionState> permissionCheck({
PermissionRequestOption requestOption = const PermissionRequestOption(),
}) {
return _pickerDelegate.permissionCheck(requestOption: requestOption);
}