VolumeSettings.fromWire constructor

VolumeSettings.fromWire(
  1. VolumeSettingsWire wire
)

Converts from wire datatype.

Implementation

VolumeSettings.fromWire(VolumeSettingsWire wire)
    : volume = wire.volume,
      fadeDuration = wire.fadeDurationMillis != null
          ? Duration(milliseconds: wire.fadeDurationMillis!)
          : null,
      fadeSteps = wire.fadeSteps.map(VolumeFadeStep.fromWire).toList(),
      volumeEnforced = wire.volumeEnforced;