MailSearch constructor

MailSearch(
  1. String query,
  2. SearchQueryType queryType, {
  3. SearchMessageType? messageType,
  4. DateTime? since,
  5. DateTime? before,
  6. DateTime? sentSince,
  7. DateTime? sentBefore,
  8. int pageSize = 20,
  9. FetchPreference fetchPreference = FetchPreference.envelope,
})

Creates a new search for query in the fields defined by queryType.

Optionally you can also define what kind of messages to search with the messageType, the internal date since a message has been received with since, the internal date before a message has been received with before, the internal date since a message has been sent with sentSince, the internal date before a message has been sent with sentBefore, the number of messages that are loaded initially with pageSize which defaults to 20. the fetchPreference for fetching the initial page of messages, defaults to FetchPreference.envelope.

Implementation

MailSearch(
  this.query,
  this.queryType, {
  this.messageType,
  this.since,
  this.before,
  this.sentSince,
  this.sentBefore,
  this.pageSize = 20,
  this.fetchPreference = FetchPreference.envelope,
});