removeContainer method
Implementation
@override
Future<void> removeContainer(String id) async {
calls.add('remove:$id');
final error = removeError;
if (error != null) throw error;
final removed = _containers.remove(id);
// Docker disconnects a removed container from every network it was on;
// mirroring that here is what lets a fake-backed prune test see a
// network's active endpoints drop to zero once its container is gone.
final networkName = removed?.network;
if (networkName != null) {
_networksByName[networkName]?.connectedContainerIds.remove(id);
}
}