AudioSessionConfiguration class Null safety

A configuration for AudioSession describing what type of audio your app intends to play, and how it interacts with other audio apps. You can either create your own configuration or use the following recipes:

You can suggest additional recipes via the GitHub issues page.

Constructors

AudioSessionConfiguration({AVAudioSessionCategory? avAudioSessionCategory, AVAudioSessionCategoryOptions? avAudioSessionCategoryOptions, AVAudioSessionMode? avAudioSessionMode, AVAudioSessionRouteSharingPolicy? avAudioSessionRouteSharingPolicy, AVAudioSessionSetActiveOptions? avAudioSessionSetActiveOptions, AndroidAudioAttributes? androidAudioAttributes, AndroidAudioFocusGainType androidAudioFocusGainType = AndroidAudioFocusGainType.gain, bool? androidWillPauseWhenDucked})
Creates an audio session configuration from scratch. [...]
const
AudioSessionConfiguration.fromJson(Map data)
AudioSessionConfiguration.music()
A recipe for creating an audio configuration for a music player.
const
AudioSessionConfiguration.speech()
A recipe for creating an audio configuration for an app that predominantly plays continuous speech such as a podcast or audiobook app.
const

Properties

androidAudioAttributes AndroidAudioAttributes?
final
androidAudioFocusGainType AndroidAudioFocusGainType
final
androidWillPauseWhenDucked bool?
final
avAudioSessionCategory AVAudioSessionCategory?
final
avAudioSessionCategoryOptions AVAudioSessionCategoryOptions?
final
avAudioSessionMode AVAudioSessionMode?
final
avAudioSessionRouteSharingPolicy AVAudioSessionRouteSharingPolicy?
final
avAudioSessionSetActiveOptions AVAudioSessionSetActiveOptions?
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

copyWith({AVAudioSessionCategory? avAudioSessionCategory, AVAudioSessionCategoryOptions? avAudioSessionCategoryOptions, AVAudioSessionMode? avAudioSessionMode, AVAudioSessionRouteSharingPolicy? avAudioSessionRouteSharingPolicy, AVAudioSessionSetActiveOptions? avAudioSessionSetActiveOptions, AndroidAudioAttributes? androidAudioAttributes, AndroidAudioFocusGainType? androidAudioFocusGainType, bool? androidWillPauseWhenDucked}) AudioSessionConfiguration
Creates a copy of this configuration with the given fields replaced by new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited