checkSpeaker method

Future<bool?> checkSpeaker()

Checks if the device speaker is on and returns a promise with a boolean value (true if speaker is on, false otherwise).

Implementation

Future<bool?> checkSpeaker() async {
  if (!Platform.isIOS) {
    return null;
  }
  return await _channel.invokeMethod<void>('checkSpeaker') as bool;
}