|  |  |  | @ -1201,55 +1201,29 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void startRecoding(BuildContext context) async { | 
		
	
		
			
				|  |  |  |  |     await Permission.microphone.request().then((PermissionStatus status) async { | 
		
	
		
			
				|  |  |  |  |       if (Platform.isIOS) { | 
		
	
		
			
				|  |  |  |  |         if (status.isPermanentlyDenied) { | 
		
	
		
			
				|  |  |  |  |           Utils.confirmDialog( | 
		
	
		
			
				|  |  |  |  |             context, | 
		
	
		
			
				|  |  |  |  |             "The app needs microphone access to be able to record audio.", | 
		
	
		
			
				|  |  |  |  |             onTap: () { | 
		
	
		
			
				|  |  |  |  |               openAppSettings().then((bool value) { | 
		
	
		
			
				|  |  |  |  |                 if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |                   Navigator.of(context).pop(); | 
		
	
		
			
				|  |  |  |  |                 } | 
		
	
		
			
				|  |  |  |  |               }); | 
		
	
		
			
				|  |  |  |  |             }, | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |         } else if (status.isDenied) { | 
		
	
		
			
				|  |  |  |  |           Utils.confirmDialog( | 
		
	
		
			
				|  |  |  |  |             context, | 
		
	
		
			
				|  |  |  |  |             "The app needs microphone access to be able to record audio.", | 
		
	
		
			
				|  |  |  |  |             onTap: () { | 
		
	
		
			
				|  |  |  |  |               openAppSettings().then((bool value) { | 
		
	
		
			
				|  |  |  |  |                 if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |                   Navigator.of(context).pop(); | 
		
	
		
			
				|  |  |  |  |                 } | 
		
	
		
			
				|  |  |  |  |               }); | 
		
	
		
			
				|  |  |  |  |             }, | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |         } else if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |           sRecoding(); | 
		
	
		
			
				|  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |           startRecoding(context); | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |     await Permission.microphone.request().then((PermissionStatus status) { | 
		
	
		
			
				|  |  |  |  |       if (status.isPermanentlyDenied) { | 
		
	
		
			
				|  |  |  |  |         Utils.confirmDialog( | 
		
	
		
			
				|  |  |  |  |           context, | 
		
	
		
			
				|  |  |  |  |           "The app needs microphone access to be able to record audio.", | 
		
	
		
			
				|  |  |  |  |           onTap: () { | 
		
	
		
			
				|  |  |  |  |             Navigator.of(context).pop(); | 
		
	
		
			
				|  |  |  |  |             openAppSettings(); | 
		
	
		
			
				|  |  |  |  |           }, | 
		
	
		
			
				|  |  |  |  |         ); | 
		
	
		
			
				|  |  |  |  |       } else if (status.isDenied) { | 
		
	
		
			
				|  |  |  |  |         Utils.confirmDialog( | 
		
	
		
			
				|  |  |  |  |           context, | 
		
	
		
			
				|  |  |  |  |           "The app needs microphone access to be able to record audio.", | 
		
	
		
			
				|  |  |  |  |           onTap: () { | 
		
	
		
			
				|  |  |  |  |             Navigator.of(context).pop(); | 
		
	
		
			
				|  |  |  |  |             openAppSettings(); | 
		
	
		
			
				|  |  |  |  |           }, | 
		
	
		
			
				|  |  |  |  |         ); | 
		
	
		
			
				|  |  |  |  |       } else if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |         sRecoding(); | 
		
	
		
			
				|  |  |  |  |       } else { | 
		
	
		
			
				|  |  |  |  |         if (status.isPermanentlyDenied) { | 
		
	
		
			
				|  |  |  |  |           Utils.confirmDialog( | 
		
	
		
			
				|  |  |  |  |             context, | 
		
	
		
			
				|  |  |  |  |             "The app needs microphone access to be able to record audio.", | 
		
	
		
			
				|  |  |  |  |             onTap: () { | 
		
	
		
			
				|  |  |  |  |               openAppSettings().then((bool value) { | 
		
	
		
			
				|  |  |  |  |                 if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |                   Navigator.of(context).pop(); | 
		
	
		
			
				|  |  |  |  |                 } | 
		
	
		
			
				|  |  |  |  |               }); | 
		
	
		
			
				|  |  |  |  |             }, | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |         } else if (status.isGranted) { | 
		
	
		
			
				|  |  |  |  |           sRecoding(); | 
		
	
		
			
				|  |  |  |  |         } else { | 
		
	
		
			
				|  |  |  |  |           startRecoding(context); | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |         startRecoding(context); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     }); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
	
		
			
				
					|  |  |  | 
 |