MusicSession class abstract

Plays music for preview in the picker, the segment selector and the editor. One instance per screen that plays music.

Constructors

MusicSession()

Properties

hashCode → int
The hash code for this object.
no setterinherited
playing → ValueListenable<bool>
Whether audio is playing.
no setter
position → ValueListenable<Duration>
Playback position within the loaded track.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → Future<void>
Releases the player.
load(MusicSource source) → Future<Duration?>
Loads source; returns the track length when known. Throws StoryException(musicUnavailable).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → Future<void>
Pauses playback.
playSegment(Duration start, Duration length, {bool loop = true}) → Future<void>
Plays from start for length, looping when loop is set.
resume() → Future<void>
Resumes playback.
seek(Duration position) → Future<void>
Seeks within the loaded track.
setVolume(double volume) → Future<void>
Sets the volume, 0–1.
stop() → Future<void>
Stops and unloads.
toString() → String
A string representation of this object.
inherited

Operators

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