|
|
|
@ -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 {
|
|
|
|
|