UserController class

Controller of the Routes.user page.

Inheritance

Constructors

UserController(UserId id, UserService _userService, ContactService _contactService, ChatService _chatService, CallService _callService)

Properties

avatar Rx<RxStatus>
Status of the ChatContact.avatar upload or removal.
final
blocklistStatus Rx<RxStatus>
Status of a block progression.
final
contact Rx<RxChatContact?>
Returns reactive RxChatContact linked to the user.
no setter
contactId ChatContactId?
Returns ChatContactId of the contact.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
no setterinherited
highlighted RxnInt
Index of an item from the profile's ScrollablePositionedList that should be highlighted.
final
id UserId
ID of the User this UserController represents.
final
initialized bool
Checks whether the controller has already been initialized.
no setterinherited
isBlocked BlocklistRecord?
Indicates whether this user is blocked.
no setter
isClosed bool
Checks whether the controller has already been closed.
no setterinherited
itemScrollController → ItemScrollController
ItemScrollController of the profile's ScrollablePositionedList.
final
listeners int
no setterinherited
me UserId?
Returns MyUser's UserId.
no setter
moreKey GlobalKey<State<StatefulWidget>>
GlobalKey of the more ContextMenuRegion button.
final
name TextFieldState
TextFieldState for ChatContact name editing.
latefinal
nameEditing RxBool
Indicator whether the editing mode is enabled.
final
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
positionsListener → ItemPositionsListener
ItemPositionsListener of the profile's ScrollablePositionedList.
final
reason TextFieldState
TextFieldState for blocking reason.
final
reporting TextFieldState
TextFieldState for report reason.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController
ScrollController to pass to a Scrollbar.
final
status Rx<RxStatus>
Status of the user fetching.
getter/setter pair
user RxUser?
Reactive User itself.
getter/setter pair

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
addToContacts() Future<void>
Adds the user to the contacts list of the authenticated MyUser.
block() Future<void>
Blocks the user for the authenticated MyUser.
call(bool withVideo) Future<void>
Starts an OngoingCall in this Chat withVideo or without.
clearChat() Future<void>
Clears a Chat-dialog history with the user.
deleteAvatar() Future<void>
Resets the ChatContact.avatar to null.
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
dropCall() Future<void>
Drops the OngoingCall happening in the RxUser.dialog.
favoriteContact() Future<void>
Marks the user as favorited.
hideChat() Future<void>
Hides a Chat-dialog with the user.
highlight(int index) → void
Highlights the item with the provided index.
joinCall() Future<void>
Joins an OngoingCall happening in the RxUser.dialog.
muteChat() Future<void>
Mutes a Chat-dialog with the user.
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.
inherited
openChat() → void
Opens a Chat-dialog with this user.
pickAvatar() Future<void>
Opens a file choose popup and updates the ChatContact.avatar with the selected image, if any.
refresh() → void
inherited
refreshGroup(Object id) → void
inherited
removeFromContacts() Future<void>
Removes the user from the contacts list of the authenticated MyUser.
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
report() Future<void>
Reports the user.
submitName() Future<void>
Submits the name field.
toString() String
A string representation of this object.
inherited
unblock() Future<void>
Removes the user from the blocklist of the authenticated MyUser.
unfavoriteContact() Future<void>
Removes the user from the favorites.
unmuteChat() Future<void>
Unmutes a Chat-dialog with the user.
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
updateAvatar(PlatformFile? image) Future<void>
Updates the ChatContact.avatar with the provided image, or resets it to null.

Operators

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