setAndroidAudioAttributes method Null safety

Future<void> setAndroidAudioAttributes(
  1. AndroidAudioAttributes audioAttributes
)

Set the Android audio attributes for this player. Has no effect on other platforms. This will cause a new Android AudioSession ID to be generated.

Implementation

Future<void> setAndroidAudioAttributes(
    AndroidAudioAttributes audioAttributes) async {
  if (_disposed) return;
  if (!_isAndroid() && !_isUnitTest()) return;
  if (audioAttributes == _androidAudioAttributes) return;
  _androidAudioAttributes = audioAttributes;
  await _internalSetAndroidAudioAttributes(await _platform, audioAttributes);
}