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