removeNetwork method

Future<void> removeNetwork(
  1. String id
)

Removes a Docker network.

Parameters:

  • id — the network ID or name to remove.

Sends DELETE /networks/{id}. Throws HttpException on failure.

Implementation

Future<void> removeNetwork(String id) async {
  final resp = await _request('DELETE', '/networks/$id');
  if (resp.statusCode != 204) {
    _throwIfError(resp);
  }
}