close method

Future<void> close ()
override

Prevents more data from being written to the response, and locks it entire from further editing.

Implementation

Future<void> close() {
  if (buffer is LockableBytesBuilder) {
    (buffer as LockableBytesBuilder).lock();
  }

  if (_done?.isCompleted == false) _done.complete();
  return Future.value();
}