state property
PlayerState
get
state
Implementation
PlayerState get state => _playerState;
set
state
(PlayerState state)
The current playback state. It is only set, when the corresponding action succeeds.
Implementation
set state(PlayerState state) {
if (_playerState == PlayerState.disposed) {
throw Exception('AudioPlayer has been disposed');
}
if (!_playerStateController.isClosed) {
_playerStateController.add(state);
}
_playerState = desiredState = state;
}