VolumeSettings.staircaseFade constructor

VolumeSettings.staircaseFade({
  1. required List<VolumeFadeStep> fadeSteps,
  2. double? volume,
  3. bool volumeEnforced = false,
})

Constructs VolumeSettings with slowly increasing (stepped) volume level.

Implementation

factory VolumeSettings.staircaseFade({
  required List<VolumeFadeStep> fadeSteps,
  double? volume,
  bool volumeEnforced = false,
}) {
  assert(fadeSteps.isNotEmpty, 'fadeSteps must not be empty');
  return VolumeSettings._(
    volume: volume,
    fadeSteps: fadeSteps,
    volumeEnforced: volumeEnforced,
  );
}