MyProfileController class
Controller of the Routes.me page.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- GetxController
- MyProfileController
Constructors
- MyProfileController(MyUserService _myUserService, SessionService _sessionService, AbstractSettingsRepository _settingsRepo, AuthService _authService, ChatService _chatService, BlocklistService _blocklistService, UpgradeWorker _upgradeWorker, CacheWorker _cacheWorker)
Properties
- about → TextFieldState
-
MyUser.bio field state.
latefinal
-
avatarUpload
→ Rx<
RxStatus> -
Status of an uploadAvatar or deleteAvatar completion.
final
-
background
→ Rx<
Uint8List?> -
Returns the current background's Uint8List value.
no setter
- blocklistCount → RxInt
-
Total BlocklistRecords count in the blocklist of the currently
authenticated MyUser.
no setter
-
credentials
→ Rx<
Credentials?> -
Returns the current Credentials.
no setter
-
devices
→ RxList<
DeviceDetails> -
List of DeviceDetails of all the available devices.
final
- devicesScrollController → ScrollController
-
ScrollController to pass to a Scrollbar in the ProfileTab.devices
section.
final
- displayName → RxBool
-
Indicator whether MyUser.name and MyUser.avatar should be displayed in
the AppBar.
final
-
downloadsDirectory
→ Rx<
Directory?> -
Returns the Directory the CacheWorker is supposed to put downloads to.
no setter
- email ↔ TextFieldState
-
TextFieldState of a UserEmail text input.
latefinal
- expanded → RxBool
-
Indicator whether the ProfileTab.signing section is expanded.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
no setterinherited
- highlightIndex → RxnInt
-
Index of an item from ProfileTab that should be highlighted.
final
- hotKeyRecording → RxBool
-
Indicator whether mute/unmute hotkey is being recorded right now.
final
- initialized → bool
-
Checks whether the controller has already been initialized.
no setterinherited
- isClosed → bool
-
Checks whether the controller has already been closed.
no setterinherited
- isMuting → RxBool
-
Indicator whether there's an ongoing toggleMute happening.
final
- itemScrollController → ItemScrollController
-
ItemScrollController
of the profile'sScrollablePositionedList
.final -
latestRelease
→ Rx<
Release?> -
Returns the latest available fetched Release of application.
no setter
- listeners → int
-
no setterinherited
- listInitIndex ↔ int
-
Index of the initial profile page section to show in a
ScrollablePositionedList
.getter/setter pair - login → TextFieldState
-
MyUser.login field state.
latefinal
-
media
→ Rx<
MediaSettings?> -
Returns the current MediaSettings value.
no setter
- mutedChatsCount → int
-
Returns the count of Chats being muted.
no setter
-
myUser
→ Rx<
MyUser?> -
Returns the currently authenticated MyUser.
no setter
- name → TextFieldState
-
MyUser.name field state.
latefinal
-
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
- phone ↔ TextFieldState
-
TextFieldState of a UserPhone text input.
latefinal
- positionsListener → ItemPositionsListener
-
ItemPositionsListener
of the profile'sScrollablePositionedList
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
ScrollController to pass to a Scrollbar.
final
-
sessions
→ RxList<
RxSession> -
Returns the list of active RxSessions.
no setter
- sessionsUpdating → RxBool
-
Indicator whether the sessions are being updated.
final
-
settings
→ Rx<
ApplicationSettings?> -
Returns the current ApplicationSettings value.
no setter
- status → TextFieldState
-
MyUser.status field state.
latefinal
- welcome ↔ WelcomeFieldController
-
WelcomeFieldController for forming and editing a WelcomeMessage.
latefinal
-
welcomeFieldKey
→ GlobalKey<
State< StatefulWidget> > -
GlobalKey of the WelcomeFieldView to prevent its state being rebuilt.
final
Methods
-
$configureLifeCycle(
) → void -
inherited
-
addListener(
GetStateUpdate listener) → Disposer -
Register a closure to be called when the object notifies its listeners.
inherited
-
addListenerId(
Object? key, GetStateUpdate listener) → Disposer -
inherited
-
clearCache(
) → Future< void> - Deletes the cache used by the application.
-
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).
-
deleteAccount(
) → Future< void> - Deletes myUser's account.
-
deleteAvatar(
) → Future< void> - Deletes the MyUser.avatar and MyUser.callCover.
-
deleteChatDirectLink(
) → Future< void> - Deletes the current ChatDirectLink of the authenticated MyUser.
-
deleteEmail(
UserEmail email) → Future< void> -
Deletes the provided
email
from MyUser.emails. -
deletePhone(
UserPhone phone) → Future< void> -
Deletes the provided
phone
from MyUser.phones. -
dispose(
) → void -
inherited
-
disposeId(
Object id) → void -
To dispose an
id
from future updates(), this ids are registered byGetBuilder()
or similar, so is a way to unlink the state change with the Widget from the Controller.inherited -
editAvatar(
) → Future< void> - Opens the CropAvatarView to update the MyUser.avatar with the CropAreaInput returned from it.
-
highlight(
ProfileTab? tab) → Future< void> -
Highlights the provided
tab
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyChildrens(
) → void -
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.
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.
override
-
pickBackground(
) → Future< void> - Opens an image choose popup and sets the selected file as a background.
-
refresh(
) → void -
inherited
-
refreshGroup(
Object id) → void -
inherited
-
removeBackground(
) → Future< void> - Removes the currently set background.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
removeListenerId(
Object id, VoidCallback listener) → void -
inherited
-
setWorkWithUsTabEnabled(
bool enabled) → Future< void> - Sets the ApplicationSettings.workWithUsTabEnabled value.
-
toggleHotKey(
[bool? value]) → void -
Toggles hotKeyRecording on and off, storing the
_keysRecorded
. -
toggleMute(
bool enabled) → Future< void> - Toggles MyUser.muted status.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
[List< Object> ? ids, bool condition = true]) → void -
Rebuilds
GetBuilder
each time you callupdate()
; Can take a List ofids
, that will only update the matchingGetBuilder( id: )
,ids
can be reused amongGetBuilders
like group tags. The update will only notify the Widgets, ifcondition
is true.inherited -
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.
-
updateUserStatus(
UserTextStatus? status) → Future< void> - Updates or resets MyUser.status field for the authenticated MyUser.
-
updateWelcomeMessage(
{ChatMessageText? text, List< Attachment> ? attachments}) → Future<void> - Updates MyUser.login field for the authenticated MyUser.
-
uploadAvatar(
) → Future< void> - Crops and uploads an image and sets it as MyUser.avatar and MyUser.callCover.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited