Mailbox class

Stores meta data about a folder aka Mailbox

Constructors

Mailbox({required String encodedName, required String encodedPath, required List<MailboxFlag> flags, required String pathSeparator, bool isReadWrite = false, int messagesRecent = 0, int messagesExists = 0, int messagesUnseen = 0, int? highestModSequence, int? firstUnseenMessageSequenceId, int? uidNext, int? uidValidity, List<String> messageFlags = const [], List<String> permanentMessageFlags = const [], Map<String, List<String>> extendedData = const {}})
Creates a new Mailbox
Mailbox.setup(String name, String path, List<MailboxFlag> flags, {String? pathSeparator})
Creates a new mailbox with the specified name, path and flags.
Mailbox.virtual(String name, List<MailboxFlag> flags)
Creates a new virtual mailbox

Properties

encodedName String
The encoded name of the mailbox
final
encodedPath String
The encoded path
final
extendedData Map<String, List<String>>
Map of extended results
final
firstUnseenMessageSequenceId int?
The sequence ID of the first unseen message
getter/setter pair
flags List<MailboxFlag>
The flags of this mailbox
final
hasChildren bool
Does this mailbox have children?
no setter
hashCode int
The hash code for this object.
no setteroverride
hasModSequence bool
This is set to false in case the server supports CONDSTORE but no mod sequence for this mailbox
no setter
highestModSequence int?
The last modification sequence in case the server supports the CONDSTORE or QRESYNC capability. Useful for message synchronization.
getter/setter pair
identityFlag MailboxFlag?
Tries to retrieve the identity flag of this mailbox
no setter
isArchive bool
Is this the archive folder?
no setter
isDrafts bool
Is this the drafts folder?
no setter
isInbox bool
Is this the inbox?
no setter
isJunk bool
Is this the junk folder?
no setter
isMarked bool
Is this mailbox marked?
no setter
isNotSelectable bool
Can this mailbox not be selected?
no setter
isReadWrite bool
Can the user both read and write this mailbox?
getter/setter pair
isSelected bool
Is this mailbox selected?
no setter
isSent bool
Is this the sent folder?
no setter
isSpecialUse bool
Does this mailbox have a known specific purpose?
no setter
isTrash bool
Is this the trash folder?
no setter
isUnselectable bool
Can this mailbox not be selected?
no setter
isVirtual bool
Is this a virtual mailbox?
no setter
messageFlags List<String>
Supported flags for messages in this mailbox
getter/setter pair
messagesExists int
The number of messages in this mailbox
getter/setter pair
messagesRecent int
Number of messages deemed by the server as recent
getter/setter pair
messagesUnseen int
The number of unseen messages - only reported through STATUS calls
getter/setter pair
name String
The human readable name of this box
getter/setter pair
path String
The human readable path
final
pathSeparator String
The separator between path elements, usually / or :.
final
permanentMessageFlags List<String>
Supported permanent flags for messages in this mailbox
getter/setter pair
qresync QResyncParameters?
Retrieves the quick resync settings of this mailbox
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uidNext int?
The expected UID of the next incoming message
getter/setter pair
uidValidity int?
The UID validity of this mailbox
getter/setter pair

Methods

copyWith({int? messagesRecent, int? messagesExists, int? messagesUnseen, int? highestModSequence, int? uidNext, List<String>? messageFlags, List<String>? permanentMessageFlags, Map<String, List<String>>? extendedData}) Mailbox
Copies this mailbox with the given parameters
getParent(List<Mailbox> knownMailboxes, String separator, {bool create = true, bool createIntermediate = true}) Mailbox?
Tries to determine the parent mailbox from the given knownMailboxes and separator.
hasFlag(MailboxFlag flag) bool
Checks of the mailbox has the given flag
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setNameFromPath() → void
Sets the name from the original path
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

encode(String path, String pathSeparator) String
Helper method to encode the specified path in Modified UTF7 encoding.