SoundSessionRequestPreferences.fromMap constructor

SoundSessionRequestPreferences.fromMap(
  1. Map<String, dynamic> map
)

Deserializes a JSON-compatible map to create an instance.

Used internally, not intended for direct use by consumers. The expected map structure may change without notice.

Implementation

factory SoundSessionRequestPreferences.fromMap(Map<String, dynamic> map) {
  return SoundSessionRequestPreferences(
    audioCategory: AudioCategoryExtension.fromId(map['audioCategory'] as int),
    audioOutput: AudioOutputExtension.fromId(map['audioOutput'] as int),
    delay: Duration(milliseconds: map['delayMs'] as int),
    exclusive: map['exclusive'] as bool,
  );
}