SwitchAudioHandler class Null safety

A SwitchAudioHandler wraps another AudioHandler that may be switched for another at any time by setting inner.

Inheritance

Constructors

SwitchAudioHandler([AudioHandler? inner])
Creates a SwitchAudioHandler with an initial inner handler, which defaults to a no-op handler.

Properties

androidPlaybackInfo ValueStream<AndroidPlaybackInfo>
A value stream of the current AndroidPlaybackInfo.
read-only, override
customEvent Stream
A stream of custom events.
read-only, override
customState ValueStream
A stream of custom states.
read-only, override
hashCode int
The hash code for this object.
read-only, inherited
inner AudioHandler
The current inner AudioHandler that this SwitchAudioHandler will delegate to.
read / write
mediaItem ValueStream<MediaItem?>
A value stream of the current media item.
read-only, override
playbackState ValueStream<PlaybackState>
A value stream of playback states.
read-only, override
queue ValueStream<List<MediaItem>>
A value stream of the current queue.
read-only, override
queueTitle ValueStream<String>
A value stream of the current queueTitle.
read-only, override
ratingStyle ValueStream<RatingStyle>
A value stream of the current rating style.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addQueueItem(MediaItem mediaItem) Future<void>
Add mediaItem to the queue.
@mustCallSuper, inherited
addQueueItems(List<MediaItem> mediaItems) Future<void>
Add mediaItems to the queue.
@mustCallSuper, inherited
androidAdjustRemoteVolume(AndroidVolumeDirection direction) Future<void>
Adjust the remote volume on Android. This works only when using RemoteAndroidPlaybackInfo.
@mustCallSuper, inherited
androidSetRemoteVolume(int volumeIndex) Future<void>
Set the remote volume on Android. This works only when using RemoteAndroidPlaybackInfo.
@mustCallSuper, inherited
click([MediaButton button = MediaButton.media]) Future<void>
Process a headset button click, where button defaults to MediaButton.media.
@mustCallSuper, inherited
customAction(String name, [Map<String, dynamic>? extras]) Future
A mechanism to support app-specific actions.
@mustCallSuper, inherited
fastForward() Future<void>
Jump forward by AudioServiceConfig.fastForwardInterval.
@mustCallSuper, inherited
getChildren(String parentMediaId, [Map<String, dynamic>? options]) Future<List<MediaItem>>
Get the children of a parent media item.
@mustCallSuper, inherited
getMediaItem(String mediaId) Future<MediaItem?>
Get a particular media item.
@mustCallSuper, inherited
insertQueueItem(int index, MediaItem mediaItem) Future<void>
Insert mediaItem into the queue at position index.
@mustCallSuper, inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onNotificationDeleted() Future<void>
Handle the notification being swiped away (Android).
@mustCallSuper, inherited
onTaskRemoved() Future<void>
Handle the task being swiped away in the task manager (Android).
@mustCallSuper, inherited
pause() Future<void>
Pause playback.
@mustCallSuper, inherited
play() Future<void>
Start or resume playback.
@mustCallSuper, inherited
playFromMediaId(String mediaId, [Map<String, dynamic>? extras]) Future<void>
Play a specific media item.
@mustCallSuper, inherited
playFromSearch(String query, [Map<String, dynamic>? extras]) Future<void>
Begin playback from a search query.
@mustCallSuper, inherited
playFromUri(Uri uri, [Map<String, dynamic>? extras]) Future<void>
Play a media item represented by a Uri.
@mustCallSuper, inherited
playMediaItem(MediaItem mediaItem) Future<void>
Play a specific media item.
@mustCallSuper, inherited
prepare() Future<void>
Prepare media items for playback.
@mustCallSuper, inherited
prepareFromMediaId(String mediaId, [Map<String, dynamic>? extras]) Future<void>
Prepare a specific media item for playback.
@mustCallSuper, inherited
prepareFromSearch(String query, [Map<String, dynamic>? extras]) Future<void>
Prepare playback from a search query.
@mustCallSuper, inherited
prepareFromUri(Uri uri, [Map<String, dynamic>? extras]) Future<void>
Prepare a media item represented by a Uri for playback.
@mustCallSuper, inherited
removeQueueItem(MediaItem mediaItem) Future<void>
Remove mediaItem from the queue.
@mustCallSuper, inherited
removeQueueItemAt(int index) Future<void>
Remove media item from the queue at the specified index.
@mustCallSuper, inherited
rewind() Future<void>
Jump backward by AudioServiceConfig.rewindInterval. Note: this value must be positive.
@mustCallSuper, inherited
Search for media items.
@mustCallSuper, inherited
seek(Duration position) Future<void>
Seek to position.
@mustCallSuper, inherited
seekBackward(bool begin) Future<void>
Begin or end seeking backward continuously.
@mustCallSuper, inherited
seekForward(bool begin) Future<void>
Begin or end seeking forward continuously.
@mustCallSuper, inherited
setCaptioningEnabled(bool enabled) Future<void>
Set whether captioning is enabled.
@mustCallSuper, inherited
setRating(Rating rating, [Map<String, dynamic>? extras]) Future<void>
Set the rating.
@mustCallSuper, inherited
setRepeatMode(AudioServiceRepeatMode repeatMode) Future<void>
Set the repeat mode.
@mustCallSuper, inherited
setShuffleMode(AudioServiceShuffleMode shuffleMode) Future<void>
Set the shuffle mode.
@mustCallSuper, inherited
setSpeed(double speed) Future<void>
Set the playback speed.
@mustCallSuper, inherited
skipToNext() Future<void>
Skip to the next item in the queue.
@mustCallSuper, inherited
skipToPrevious() Future<void>
Skip to the previous item in the queue.
@mustCallSuper, inherited
skipToQueueItem(int index) Future<void>
Skip to a queue item.
@mustCallSuper, inherited
stop() Future<void>
Stop playback and release resources.
@mustCallSuper, inherited
subscribeToChildren(String parentMediaId) ValueStream<Map<String, dynamic>>
Get a value stream that emits service-specific options to send to the client whenever the children under the specified parent change. The emitted options may contain information about what changed. A client that is subscribed to this stream should call getChildren to obtain the changed children.
@mustCallSuper, inherited
toString() String
A string representation of this object.
inherited
updateMediaItem(MediaItem mediaItem) Future<void>
Update the properties of mediaItem.
@mustCallSuper, inherited
updateQueue(List<MediaItem> queue) Future<void>
Update to the queue to queue.
@mustCallSuper, inherited

Operators

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