setSoundPlayingPreferences static method

void setSoundPlayingPreferences(
  1. SoundPlayingPreferences soundPlayingPreferences, {
  2. AlertSeverity severity = AlertSeverity.information,
})

Apply sound playback preferences for the given severity.

Only fields present in the provided SoundPlayingPreferences instance are applied. To change preferences, modify an instance returned by getSoundPlayingPreferences and call this method to persist the change.

This method does not take into account any ongoing system interruptions.

Parameters

Implementation

static void setSoundPlayingPreferences(
  SoundPlayingPreferences soundPlayingPreferences, {
  AlertSeverity severity = AlertSeverity.information,
}) {
  staticMethod(
    'SoundService',
    'setSoundPlayingPreferences',
    args: <String, Object>{
      'severity': severity.id,
      'preferences': soundPlayingPreferences.toMap(),
    },
  );
}