disconnect method Null safety

Future disconnect()

Disconnects from the mail service.

Also compare connect.

Implementation

Future disconnect() async {
  final futures = <Future>[];
  futures.add(stopPollingIfNeeded());
  futures.add(_incomingMailClient.disconnect());
  futures.add(_outgoingMailClient.disconnect());
  _isConnected = false;
  return Future.wait(futures);
}