ChatInfoController class
Controller of the Routes.chatInfo page.
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- GetxController
- ChatInfoController
Constructors
- ChatInfoController(ChatId chatId, ChatService _chatService, AuthService _authService, CallService _callService, MyUserService _myUserService, AbstractSettingsRepository _settingsRepo)
Properties
-
avatarCrop
→ Rx<
CropAreaInput?> -
CropAreaInput of the currently edited ChatAvatar to upload in
submitAvatar.
final
- avatarDeleted → RxBool
-
Indicator whether the currently edited ChatAvatar should be deleted in
submitAvatar.
final
-
avatarImage
→ Rx<
NativeFile?> -
NativeFile of the currently edited ChatAvatar to upload in
submitAvatar.
final
-
avatarKey
→ GlobalKey<
State< StatefulWidget> > -
GlobalKey of an AvatarWidget displayed used to open a GalleryPopup.
final
-
avatarUpload
→ Rx<
RxStatus> -
Status of the Chat.avatar upload or removal.
final
-
background
→ Rx<
Uint8List?> -
Returns the current background's Uint8List value.
no setter
- canEdit → bool
-
Indicates whether the Chat.avatar and Chat.name can be edited.
no setter
- chat ↔ RxChat?
-
Reactive state of the Chat this page is about.
getter/setter pair
- chatId → ChatId
-
ID of the Chat this page is about.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
no setterinherited
- haveNext → RxBool
-
Indicates whether the Chat.members have a next page.
no setter
- highlighted → RxnInt
-
Index of an item from the page's
ScrollablePositionedList
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
- isMonolog → bool
-
Indicates whether the chat is a monolog.
no setter
- itemScrollController → ItemScrollController
-
ItemScrollController
of the page'sScrollablePositionedList
.final - listeners → int
-
no setterinherited
- me → UserId?
-
Returns MyUser's UserId.
no setter
- membersScrollController → ScrollController
-
ScrollController to pass to a members ListView.
final
-
moreKey
→ GlobalKey<
State< StatefulWidget> > -
GlobalKey of the more ContextMenuRegion button.
final
-
myUser
→ Rx<
MyUser?> -
Returns the currently authenticated MyUser.
no setter
- name ↔ TextFieldState
-
Chat.name field state.
latefinal
- nameEditing → RxBool
-
Indicator whether the Chat.avatar and Chat.name 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 page'sScrollablePositionedList
.final - profileEditing → RxBool
-
Indicator whether the Chat.avatar and Chat.name editing mode is
enabled.
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 chat fetching.
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
-
call(
bool withVideo) → Future< void> -
Starts a ChatCall in this Chat
withVideo
or without. -
clearChat(
) → Future< void> - Clears all the ChatItems of the chat.
-
closeEditing(
) → void - Exits the profileEditing.
-
createChatDirectLink(
ChatDirectLinkSlug? slug) → Future< void> - Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and deletes the current active ChatDirectLink of the given Chat-group (if any).
-
deleteAvatar(
) → Future< void> -
Resets the Chat.avatar to
null
. -
deleteChatDirectLink(
) → Future< void> - Deletes the current ChatDirectLink of the given Chat-group.
-
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.
-
favoriteChat(
) → Future< void> - Marks the chat as favorited.
-
hideChat(
) → Future< void> - Hides the chat.
-
highlight(
int index) → void -
Highlights the item with the provided
index
. -
joinCall(
) → Future< void> - Joins an OngoingCall happening in the chat.
-
muteChat(
) → Future< void> - Mutes the chat.
-
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
-
pickAvatar(
) → Future< void> - Opens a file choose popup and updates the Chat.avatar with the selected image, if any.
-
redialChatCallMember(
UserId userId) → Future< void> -
Redials the User identified by its
userId
. -
refresh(
) → void -
inherited
-
refreshGroup(
Object id) → void -
inherited
-
removeChatCallMember(
UserId userId) → Future< void> - Removes the specified User from a OngoingCall happening in the chat.
-
removeChatMember(
UserId userId) → Future< void> -
Removes User identified by the provided
userId
from the chat. -
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
-
reportChat(
) → Future< void> - Reports the chat.
-
submitAvatar(
) → Future< void> - Uploads the current edits (avatarCrop, avatarImage and avatarDeleted).
-
submitName(
) → Future< void> - Submits the name field.
-
toString(
) → String -
A string representation of this object.
inherited
-
unfavoriteChat(
) → Future< void> - Removes the chat from the favorites.
-
unmuteChat(
) → Future< void> - Unmutes the chat.
-
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 -
updateChatAvatar(
PlatformFile? image, {CropAreaInput? crop}) → Future< void> -
Updates the Chat.avatar with the provided
image
, or resets it tonull
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited