Gets the current state of the task.
Returns: The TaskState.
TaskState get state { return _state; }
Sets the state of the task.
set state(TaskState newState) { this._state = newState; }