|
|
@@ -238,18 +238,26 @@ class RecordHandler {
|
|
|
}
|
|
|
|
|
|
Future<void> startOrContinueRecord() async {
|
|
|
- var isGranted = await Permission.microphone.status;
|
|
|
- if (isGranted == PermissionStatus.granted) {
|
|
|
- await Permission.microphone.request();
|
|
|
- } else {
|
|
|
- bool isAllow = await _showRequestPermissionDialog();
|
|
|
- if (isAllow) {
|
|
|
- var status = await Permission.microphone.request();
|
|
|
- if (status != PermissionStatus.granted) {
|
|
|
+ if (GetPlatform.isAndroid) {
|
|
|
+ var isGranted = await Permission.microphone.status;
|
|
|
+ if (isGranted == PermissionStatus.granted) {
|
|
|
+ await Permission.microphone.request();
|
|
|
+ } else {
|
|
|
+ bool isAllow = await _showRequestPermissionDialog();
|
|
|
+ if (isAllow) {
|
|
|
+ var status = await Permission.microphone.request();
|
|
|
+ if (status != PermissionStatus.granted) {
|
|
|
+ _onRecordPermissionDenied();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
_onRecordPermissionDenied();
|
|
|
return;
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ var status = await Permission.microphone.request();
|
|
|
+ if (status != PermissionStatus.granted) {
|
|
|
_onRecordPermissionDenied();
|
|
|
return;
|
|
|
}
|