finish method

  1. @override
void finish([
  1. bool autoDispose = true
])

Finishes this token and notifies onFinish listener. Typically called by API.

Implementation

@override
void finish([bool autoDispose = true]) {
  super.finish();

  _isFinished = true;
  _client.onFinish?.call();
  onFinish?.call();

  if (autoDispose) {
    dispose();
  }
}