MyUserService class
Service responsible for MyUser management.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- DisposableService
- MyUserService
Constructors
- MyUserService(AuthService _authService, AbstractMyUserRepository _myUserRepository)
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 authenticated MyUser.
no setter
-
onDelete
→ InternalFinalCallback<
void> -
Internal callback that starts the cycle of this controller.
finalinherited
-
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
-
profiles
→ RxObsMap<
UserId, Rx< MyUser> > -
Returns a reactive map of all the known MyUser profiles.
no setter
- 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. -
addUserPhone(
UserPhone phone, {ConfirmationCode? confirmation, String? locale}) → Future< void> -
Adds a new
phone
number for the authenticated MyUser. -
createChatDirectLink(
ChatDirectLinkSlug slug) → Future< void> - Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and deletes the current active ChatDirectLink of the authenticated MyUser (if any).
-
deleteChatDirectLink(
) → Future< void> - Deletes the current ChatDirectLink of the authenticated MyUser.
-
deleteMyUser(
{UserPassword? password, ConfirmationCode? confirmation}) → Future< void> - Deletes the authenticated MyUser completely.
-
deleteUserEmail(
UserEmail email, {UserPassword? password, ConfirmationCode? confirmation}) → Future< void> -
Deletes the given
email
from MyUser.emails of the authenticated MyUser. -
deleteUserPhone(
UserPhone phone, {UserPassword? password, ConfirmationCode? confirmation}) → Future< void> -
Deletes the given
phone
from MyUser.phones for the authenticated MyUser. -
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.
inherited
-
onInit(
) → void -
Called immediately after the widget is allocated in memory.
You might use this to initialize something for the controller.
override
-
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.
-
toggleMute(
MuteDuration? mute) → Future< void> - Mutes or unmutes all the Chats of the authenticated MyUser.
-
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
. -
updateCallCover(
NativeFile? file, {void onSendProgress(int count, int total)?}) → Future< void> -
Updates or resets the MyUser.callCover field with the provided image
file
. -
updateUserBio(
UserBio? bio) → Future< void> - Updates or resets the MyUser.bio field of the authenticated MyUser.
-
updateUserLogin(
UserLogin? login) → Future< void> - Updates MyUser.login field for the authenticated MyUser.
-
updateUserName(
UserName? name) → Future< void> - Updates MyUser.name field for the authenticated MyUser.
-
updateUserPassword(
{UserPassword? oldPassword, required UserPassword newPassword}) → Future< void> - Updates password for the authenticated MyUser.
-
updateUserPresence(
Presence presence) → Future< void> - Updates MyUser.presence to the provided value.
-
updateUserStatus(
UserTextStatus? status) → Future< void> - Updates or resets the MyUser.status field of the authenticated MyUser.
-
updateWelcomeMessage(
{ChatMessageText? text, List< Attachment> ? attachments}) → Future<void> - Updates the WelcomeMessage of the authenticated MyUser.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited