|
|
@@ -211,10 +211,13 @@ class RecordHandler {
|
|
|
}
|
|
|
|
|
|
Future<void> startOrContinueRecord() async {
|
|
|
- var status = await Permission.microphone.request();
|
|
|
- if (status != PermissionStatus.granted) {
|
|
|
- _onRecordPermissionDenied();
|
|
|
- return;
|
|
|
+ var status = await Permission.microphone.status;
|
|
|
+ if (!status.isGranted) {
|
|
|
+ var result = await Permission.microphone.request();
|
|
|
+ if (!result.isGranted) {
|
|
|
+ _onRecordPermissionDenied();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
await _requestForegroundTaskPermission().catchError((error) {
|