getAudioActive method Null safety

Future<bool> getAudioActive(
  1. String sourceName
)

Get the audio's active status of a specified source.

Implementation

Future<bool> getAudioActive(String sourceName) async {
  final response = await command('GetAudioActive');

  if (response == null) {
    throw Exception('Problem getting audio response');
  }

  return response.rawResponse['audioActive'] == 'true';
}