MyUserRepository class

MyUser repository.

Inheritance
Implemented types

Constructors

MyUserRepository(GraphQlProvider _graphQlProvider, MyUserDriftProvider _driftMyUser, BlocklistRepository _blocklistRepository, UserRepository _userRepository, AccountDriftProvider _accountLocal)

Properties

hashCode int
The hash code for this object.
no setterinherited
initialized bool
Checks whether the controller has already been initialized.
no setterinherited
isClosed bool
Checks whether the controller has already been closed.
no setterinherited
myUser Rx<MyUser?>
Returns the currently active MyUser profile.
final
onDelete InternalFinalCallback<void>
Internal callback that starts the cycle of this controller.
finalinherited
onPasswordUpdated ↔ void Function()
Callback that is called when MyUser's password is changed.
latefinal
onStart InternalFinalCallback<void>
Called at the exact moment the widget is allocated in memory. It uses an internal "callable" type, to avoid any @overrides in subclases. This method should be internal and is required to define the lifetime cycle of the subclass.
finalinherited
onUserDeleted ↔ void Function()
Callback that is called when MyUser is deleted.
latefinal
profiles RxObsMap<UserId, Rx<MyUser>>
Returns a reactive map of known MyUser profiles.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$configureLifeCycle() → void
inherited
addUserEmail(UserEmail email, {ConfirmationCode? confirmation, String? locale}) Future<void>
Adds a new email address for the authenticated MyUser.
override
addUserPhone(UserPhone phone, {ConfirmationCode? confirmation, String? locale}) Future<void>
Adds a new phone number for the authenticated MyUser.
override
Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and deletes the current active ChatDirectLink of the authenticated MyUser (if any).
override
Deletes the current ChatDirectLink of the authenticated MyUser.
override
deleteMyUser({UserPassword? password, ConfirmationCode? confirmation}) Future<void>
Deletes the authenticated MyUser completely.
override
deleteUserEmail(UserEmail email, {UserPassword? password, ConfirmationCode? confirmation}) Future<void>
Deletes the given email from MyUser.emails of the authenticated MyUser.
override
deleteUserPhone(UserPhone phone, {UserPassword? password, ConfirmationCode? confirmation}) Future<void>
Deletes the given phone from MyUser.phones for the authenticated MyUser.
override
init({required dynamic onUserDeleted(), required dynamic onPasswordUpdated()}) Future<void>
Initializes the repository.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClose() → void
Called before onDelete method. onClose might be used to dispose resources used by the controller. Like closing events, or streams before the controller is destroyed. Or dispose objects that can potentially create some memory leaks, like TextEditingControllers, AnimationControllers. Might be useful as well to persist some data on disk.
override
onInit() → void
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
inherited
onReady() → void
Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.
inherited
refresh() Future<void>
Refreshes the MyUser to be up to date.
override
toggleMute(MuteDuration? mute) Future<void>
Mutes or unmutes all the Chats of the authenticated MyUser.
override
toString() String
A string representation of this object.
inherited
updateAvatar(NativeFile? file, {CropAreaInput? crop, void onSendProgress(int count, int total)?}) Future<void>
Updates or resets the MyUser.avatar field with the provided image file.
override
updateCallCover(NativeFile? file, {void onSendProgress(int count, int total)?}) Future<void>
Updates or resets the MyUser.callCover field with the provided image file.
override
updateUserBio(UserBio? bio) Future<void>
Updates or resets the MyUser.bio field of the authenticated MyUser.
override
updateUserLogin(UserLogin? login) Future<void>
Updates MyUser.login field for the authenticated MyUser.
override
updateUserName(UserName? name) Future<void>
Updates MyUser.name field for the authenticated MyUser.
override
updateUserPassword(UserPassword? oldPassword, UserPassword newPassword) Future<void>
Updates password for the authenticated MyUser.
override
updateUserPresence(Presence presence) Future<void>
Updates MyUser.presence to the provided value.
override
updateUserStatus(UserTextStatus? status) Future<void>
Updates or resets the MyUser.status field of the authenticated MyUser.
override
updateWelcomeMessage({ChatMessageText? text, List<Attachment>? attachments}) Future<void>
Updates the WelcomeMessage of the authenticated MyUser.
override

Operators

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