state property

PlayerState state

Implementation

PlayerState get state => _playerState;
void 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;
}