resume method

Future<void> resume()

Resumes the mail client after a some inactivity.

Reconnects the mail client in the background, if necessary.

Implementation

Future<void> resume() async {
  try {
    if (isPolling()) {
      await stopPolling();
      await startPolling();
    } else {
      await _incomingMailClient.noop();
    }
  } catch (e, s) {
    print('error while resuming: $e $s');
    // the re-connection should be triggered automatically
  }
}