From 377fd486934c3e8b0779f7d0fb880d6cf53349bf Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 2 Jan 2023 14:47:38 +0300 Subject: [PATCH] Ios Fix --- lib/provider/chat_provider_model.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/provider/chat_provider_model.dart b/lib/provider/chat_provider_model.dart index 8a91ddd..d6e3b57 100644 --- a/lib/provider/chat_provider_model.dart +++ b/lib/provider/chat_provider_model.dart @@ -1201,14 +1201,17 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { } void startRecoding() async { - PermissionStatus status = await Permission.microphone.request(); - if (status.isDenied) { - startRecoding(); - } else if (status.isGranted) { - sRecoding(); - } else { - startRecoding(); - } + await Permission.microphone.request().then((PermissionStatus status){ + if (status.isPermanentlyDenied) { + // startRecoding(); + } else if (status.isDenied) { + startRecoding(); + } else if (status.isGranted) { + sRecoding(); + } else { + startRecoding(); + }}); + } // else {