setSoundPlayingPreferences static method
void
setSoundPlayingPreferences(
- SoundPlayingPreferences soundPlayingPreferences, {
- 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
soundPlayingPreferences: Preferences to apply.severity: Target alert severity (defaults to AlertSeverity.information).
Implementation
static void setSoundPlayingPreferences(
SoundPlayingPreferences soundPlayingPreferences, {
AlertSeverity severity = AlertSeverity.information,
}) {
staticMethod(
'SoundService',
'setSoundPlayingPreferences',
args: <String, Object>{
'severity': severity.id,
'preferences': soundPlayingPreferences.toMap(),
},
);
}