Mailbox.setup constructor
Mailbox.setup(
- String name,
- String path,
- List<
MailboxFlag> flags, { - String? pathSeparator,
Creates a new mailbox with the specified name
, path
and flags
.
Optionally specify the path separator with pathSeparator
Implementation
Mailbox.setup(String name, String path, this.flags, {String? pathSeparator}) {
this.name = name;
this.path = path;
if (pathSeparator != null) {
this.pathSeparator = pathSeparator;
}
if (name.toUpperCase() == 'INBOX' && !isInbox) {
flags.add(MailboxFlag.inbox);
}
isMarked = hasFlag(MailboxFlag.marked);
hasChildren = hasFlag(MailboxFlag.hasChildren);
isSelected = hasFlag(MailboxFlag.select);
isUnselectable = hasFlag(MailboxFlag.noSelect);
}