deleteMailbox method Null safety

Future<void> deleteMailbox(
  1. Mailbox mailbox
)

Implementation

Future<void> deleteMailbox(Mailbox mailbox) async {
  if (!supportsMailboxes) {
    throw MailException(
        this, 'Mailboxes are not supported, check "supportsMailboxes" first');
  }
  await _incomingMailClient.deleteMailbox(mailbox);
  _mailboxes?.remove(mailbox);
}