AuthenticatedUser class

A class that represents an authenticated user

This class contains an user's account, its password and its access token

Annotations
  • @unfreezed

Constructors

AuthenticatedUser({required Account account, required String password, required String token})
Constructor for AuthenticatedUser. MUST NOT be used manually Use MailTm and AuthorizedUser
factory
AuthenticatedUser.fromJson(Map<String, Object?> json)
AuthenticatedUser jsonizer. Allows freezed to add a from/toJson
factory

Properties

account Account
getter/setter pairinherited
copyWith → $AuthenticatedUserCopyWith<AuthenticatedUser>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
password String
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
getter/setter pairinherited

Methods

allMessages() Stream<List<Message>>
Gets every message as a stream.
delete() Future<bool>
Deletes the account.
deleteMessage(String id) Future<bool>
Deletes a message from its id
downloadAttachment(String downloadUrl) Future<List<int>>
Downloads an attachment
messageFrom(String id) Future<Message>
Gets a message from its id
messages() Stream<Message>
A stream to listen to this account's messages.
messagesAt(int page) Future<List<Message>>
Gets a message at a given page. HydraMessages.hydraMax messages per page.
messageSource(String id) Future<MessageSource>
Gets a message's source
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readMessage(String id) Future<bool>
Marks a message as read from its id
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
unreadMessage(String id) Future<bool>
Marks a message as unread from its id
update() Future<void>
Updates this AuthenticatedUser's account.

Operators

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