shutdown function Null safety

Future<void> shutdown(
  1. StreamChannel<Object?> channel

Sends a shutdown request over a channel.

On the remote side, the corresponding channel must have been passed to DriftServer.serve for this setup to work. Also, the DriftServer must have been configured to allow remote-shutdowns.


Future<void> shutdown(StreamChannel<Object?> channel) {
  final comm = DriftCommunication(channel);
  return comm.request(NoArgsRequest.terminateAll);