state property

PlayerState get state
inherited

Implementation

PlayerState get state => _playerState;
set state (PlayerState state)
inherited

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;
}