AudioMessageController class

Coordinates one-playing-at-a-time across many AudioMessageTile widgets that share a single AudioPlayerAdapter. Hold one instance per logical audio context (a chat thread, a podcast list) and pass the same instance to every tile.

Inheritance

Properties

activeSource → String?
no setter
adapter → AudioPlayerAdapter
final
duration → Duration?
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isPlaying → bool
no setter
position → Duration
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
override
isActive(String source) → bool
isPlayingSource(String source) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pauseSource(String source) → Future<void>
Pause if source is the active source. No-op otherwise.
playSource(String source) → Future<void>
Make source the active source and start playback. If a different source was active, it is implicitly paused via adapter.load.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
seek(Duration position) → Future<void>
Seek the active source. No-op if no source is active.
toggleSource(String source) → Future<void>
Toggles play/pause for source. Calling on a non-active source switches to it and starts playing.
toString() → String
A string representation of this object.
inherited

Operators

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