checkMicrophonePermission method

Future<bool> checkMicrophonePermission()

Implementation

Future<bool> checkMicrophonePermission() async {
  try {
    final status = await Permission.microphone.request();
    return status.isGranted;
  } catch (e) {
    print('Error checking microphone permission: $e');
    return false;
  }
}