requestPermission function
Future<bool>
requestPermission(
- Permission permission
)
Implementation
Future<bool> requestPermission(Permission permission) async {
PermissionStatus? status;
try {
status = await permission.request();
} catch (e) {
ZegoLoggerService.logError(
'$permission permission not granted, $e',
tag: 'uikit',
subTag: 'permission',
);
}
if (status != PermissionStatus.granted) {
ZegoLoggerService.logError(
'$permission permission not granted, $status',
tag: 'uikit',
subTag: 'permission',
);
return false;
}
return true;
}