|
|
|
@ -1201,18 +1201,13 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void startRecoding(BuildContext context) async {
|
|
|
|
void startRecoding(BuildContext context) async {
|
|
|
|
// if (await Permission.microphone.request().isGranted) {
|
|
|
|
|
|
|
|
// sRecoding();
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// Utils.showToast("Permission Issue");
|
|
|
|
|
|
|
|
// openAppSettings();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
await Permission.microphone.request().then((PermissionStatus status) {
|
|
|
|
await Permission.microphone.request().then((PermissionStatus status) {
|
|
|
|
if (status.isPermanentlyDenied) {
|
|
|
|
if (status.isPermanentlyDenied) {
|
|
|
|
Utils.confirmDialog(
|
|
|
|
Utils.confirmDialog(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
"The app needs microphone access to be able to record audio.",
|
|
|
|
"The app needs microphone access to be able to record audio.",
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
openAppSettings();
|
|
|
|
openAppSettings();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -1221,6 +1216,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
"The app needs microphone access to be able to record audio.",
|
|
|
|
"The app needs microphone access to be able to record audio.",
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
openAppSettings();
|
|
|
|
openAppSettings();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -1232,16 +1228,6 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
|
|
|
// isVoiceMsg = true;
|
|
|
|
|
|
|
|
// recorderController.reset();
|
|
|
|
|
|
|
|
// await recorderController.record(path);
|
|
|
|
|
|
|
|
// _recodeDuration = 0;
|
|
|
|
|
|
|
|
// _startTimer();
|
|
|
|
|
|
|
|
// isRecoding = !isRecoding;
|
|
|
|
|
|
|
|
// notifyListeners();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void sRecoding() async {
|
|
|
|
void sRecoding() async {
|
|
|
|
isVoiceMsg = true;
|
|
|
|
isVoiceMsg = true;
|
|
|
|
recorderController.reset();
|
|
|
|
recorderController.reset();
|
|
|
|
|