canSwitchSpeaker method

  1. @override
Future<bool> canSwitchSpeaker()

Query is audio speaker enable.
Return true: enable false: disable (some pad not support telephony,or some device not support)

Implementation

@override
Future<bool> canSwitchSpeaker() async {
  return await methodChannel
      .invokeMethod<bool>('canSwitchSpeaker')
      .then<bool>((bool? value) => value ?? false);
}