close method

Future<void> close()

Stops the server (in serve mode) and closes the HTTP client.

Implementation

Future<void> close() async {
  _httpClient?.close(force: true);
  await _server?.close(drain: const Duration(seconds: 1));
}