routeAudioTo method

  1. @override
Future<bool?> routeAudioTo({
  1. required String routeType,
})
override

This method is used to route the audio to different devices.

Implementation

@override
Future<bool?> routeAudioTo({required String routeType}) async {
  bool? res;
  try {
    res = await mirrorFlyCallMethodChannel
        .invokeMethod('routeAudioTo', {"routeType": routeType});
    LogMessage.d('muteAudio', '$res');
    return res;
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Exception ", " $error");
    rethrow;
  }
}