addOutgoingServer method Null safety

void addOutgoingServer(
  1. ServerConfig server
)

Implementation

void addOutgoingServer(ServerConfig server) {
  outgoingServers ??= <ServerConfig>[];
  outgoingServers!.add(server);
  preferredOutgoingServer ??= server;
  if (server.type == ServerType.smtp && preferredOutgoingSmtpServer == null) {
    preferredOutgoingSmtpServer = server;
  }
}