diff --git a/lib/provider/chat_provider_model.dart b/lib/provider/chat_provider_model.dart index d6e3b57..53dbade 100644 --- a/lib/provider/chat_provider_model.dart +++ b/lib/provider/chat_provider_model.dart @@ -1201,17 +1201,23 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { } void startRecoding() async { - await Permission.microphone.request().then((PermissionStatus status){ + // if (await Permission.microphone.request().isGranted) { + // sRecoding(); + // } else { + // Utils.showToast("Permission Issue"); + // openAppSettings(); + // } + await Permission.microphone.request().then((PermissionStatus status) { if (status.isPermanentlyDenied) { - // startRecoding(); + openAppSettings(); } else if (status.isDenied) { - startRecoding(); + openAppSettings(); } else if (status.isGranted) { sRecoding(); } else { startRecoding(); - }}); - + } + }); } // else {