requestPermissionsMicrophone static method
Actually, just that Implement for video call.
Implementation
static Future<PermissionStatus?> requestPermissionsMicrophone() async {
if (Platform.isAndroid) {
return Permission.microphone.request();
} else if (Platform.isIOS) {
final PermissionStatus valueOfMicrophone =
await Permission.microphone.request();
mLogger.d('_requestPermissions::valueOfMicrophone::$valueOfMicrophone');
return (valueOfMicrophone == PermissionStatus.granted) ||
(valueOfMicrophone == PermissionStatus.limited) ||
(valueOfMicrophone == PermissionStatus.provisional)
? PermissionStatus.granted
: PermissionStatus.denied;
} else {
throw Exception('Unsupported platform');
}
}