EmailManager mixin

Mixin that manages email sending and email address storage for API logging.

Superclass constraints
Mixin applications

Properties

apiLogConfig ApiLogConfig
Which API log details are captured and logged.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isLogEnabled bool
Whether logging is enabled.
getter/setter pairinherited
models List<BaseModel>
The list of models tracked by the logger.
getter/setter pairinherited
The navigator key for navigation operations.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveManager SaveManager
The save manager for persistent storage.
getter/setter pairinherited

Methods

addEmail(String email) → void
Adds a new email address to the list and persists the change.
clearEmails({bool isClearSavedData = false}) → void
Clears all email addresses and the selected email, optionally clearing saved data as well.
editEmail(String newEmail, String oldEmail) → void
Edits an existing email address and persists the change.
getNextId() int
Get the next unique ID.
inherited
getSelectedEmail() String?
Gets the currently selected email address.
getSendEmails() List<String>
Gets the list of email addresses used for sending logs.
getSendEmailsFromCache() Future<List<String>>
Loads the list of email addresses and the selected email from persistent storage.
initEmail(SendTextFunction? sendText) → void
Initializes the email manager with a send text function.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEmail(String email) → void
Removes an email address from the list and persists the change.
saveSelectedEmail() Future<bool>
Persists the selected email address.
sendText({required String body, required String title, required String email, String? url}) Future<String?>
Sends text via email using the configured send text function.
setSelectedEmail(String? email) → void
Sets the selected email address and persists the change.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

selectedEmailsKey → const String
Key for saving the selected email address.
sendEmailsKey → const String
Key for saving the list of email addresses.