Document FullAudioPlaybackState

This commit is contained in:
Ryan Heise 2020-04-07 14:30:37 +10:00
parent 12ce6ed653
commit 60aeecf107
1 changed files with 8 additions and 0 deletions

View File

@ -373,6 +373,9 @@ class AudioPlaybackEvent {
}
/// Enumerates the different playback states of a player.
///
/// If you also need access to the buffering state, use
/// [FullAudioPlaybackState].
enum AudioPlaybackState {
none,
stopped,
@ -382,6 +385,11 @@ enum AudioPlaybackState {
completed,
}
/// Encapsulates the playback state and the buffering state.
///
/// These two states vary orthogonally, and so if [buffering] is true, you can
/// check [state] to determine whether this buffering is occurring during the
/// playing state or the paused state.
class FullAudioPlaybackState {
final AudioPlaybackState state;
final bool buffering;