UserController class
Controller of the Routes.user page.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- GetxController
- UserController
- Implemented types
Constructors
- UserController(UserId id, UserService _userService, ChatService _chatService, CallService _callService, PartnerService _partnerService)
Properties
-
avatar
→ Rx<
RxStatus> -
Status of the
ChatContact.avatarupload or removal.final -
blocklistStatus
→ Rx<
RxStatus> -
Status of a block progression.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
no setterinherited
- highlighted → RxnInt
-
Index of an item from the profile's
ScrollablePositionedListthat should be highlighted.final - id → UserId
-
ID of the User this UserController represents.
final
-
individual
→ RxMap<
UserId, Rx< MonetizationSettings> > -
Returns the individual MonetizationSettings for separate UserIds.
no setter
- 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
- isFavorite → bool
-
Indicates whether the contact's chat is a favorite.
no setter
- isSupport → bool
-
Indicates whether this user is a Config.supportId.
no setter
- itemScrollController → ItemScrollController
-
ItemScrollControllerof the profile'sScrollablePositionedList.final - listeners → int
-
no setterinherited
- me → UserId?
-
Returns MyUser's UserId.
no setter
-
moreKey
→ GlobalKey<
State< StatefulWidget> > -
GlobalKey of the more ContextMenuRegion button.
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
-
ItemPositionsListenerof the profile'sScrollablePositionedList.final - preferName → RxBool
-
Indicator whether the app bar should display the User.name.
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
-
settings
→ Rx<
MonetizationSettings> -
Returns the MonetizationSettings of the authenticated MyUser.
no setter
-
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
-
block(
) → Future< void> - Blocks the user for the authenticated MyUser.
-
call(
bool withVideo) → Future< void> -
Starts an OngoingCall in this Chat
withVideoor without. -
clearChat(
) → Future< void> - Clears a Chat-dialog history with the user.
-
deleteAvatar(
) → Future< void> -
Resets the
ChatContact.avatartonull. -
dispose(
) → void -
inherited
-
disposeId(
Object id) → void -
To dispose an
idfrom 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 -
dropCall(
) → Future< void> - Drops the OngoingCall happening in the RxUser.dialog.
-
favoriteChat(
) → Future< void> - Marks a Chat-dialog with the user as favorite.
-
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.avatarwith the selected image, if any. -
refresh(
) → void -
inherited
-
refreshGroup(
Object id) → void -
inherited
-
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.
-
toString(
) → String -
A string representation of this object.
inherited
-
unblock(
) → Future< void> - Removes the user from the blocklist of the authenticated MyUser.
-
unfavoriteChat(
) → Future< void> - Removes a Chat-dialog with the user from the favorites.
-
unmuteChat(
) → Future< void> - Unmutes a Chat-dialog with the user.
-
update(
[List< Object> ? ids, bool condition = true]) → void -
Rebuilds
GetBuildereach time you callupdate(); Can take a List ofids, that will only update the matchingGetBuilder( id: ),idscan be reused amongGetBuilderslike group tags. The update will only notify the Widgets, ifconditionis true.inherited -
updateAvatar(
PlatformFile? image) → Future< void> -
Updates the
ChatContact.avatarwith the providedimage, or resets it tonull. -
updateMonetizationSettings(
{bool? donationsEnabled, Sum? donationsMinimum}) → Future< void> - Updates the MonetizationSettings for the current User.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited