MyProfileController class

Controller of the Routes.me page.

Inheritance

Constructors

MyProfileController(MyUserService _myUserService, SessionService _sessionService, AbstractSettingsRepository _settingsRepo, AuthService _authService, ChatService _chatService, BlocklistService _blocklistService)

Properties

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
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
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's ScrollablePositionedList.
final
listeners int
no setterinherited
listInitIndex int
Index of the initial profile page section to show in a ScrollablePositionedList.
getter/setter pair
media Rx<MediaSettings?>
Returns the current MediaSettings value.
no setter
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
phone TextFieldState
TextFieldState of a UserPhone text input.
latefinal
positionsListener → ItemPositionsListener
ItemPositionsListener of the profile's ScrollablePositionedList.
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
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.
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.
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 by GetBuilder() 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.
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 call update(); Can take a List of ids, that will only update the matching GetBuilder( id: ), ids can be reused among GetBuilders like group tags. The update will only notify the Widgets, if condition 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.
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