setEchoCancellation function

Future<void> setEchoCancellation()

Implementation

Future<void> setEchoCancellation() async {
  if (!Platform.isIOS) {
    return;
  }
  const platform = MethodChannel('huddle01_flutter_client');
  try {
    await platform.invokeMethod('setPreferredAudioOutput');
    logger.i('setEchoCancellation | successful');
  } on PlatformException catch (e) {
    logger.e("setEchoCancellation | failed: '${e.message}'.");
  }
}