CometChatMessagesController class

CometChatMessagesController is the view model for CometChatMessages it contains all the business logic involved in changing the state of the UI of CometChatMessages

Inheritance
  • Object
  • GetLifeCycle
  • DisposableInterface
  • GetxController
  • CometChatMessagesController
Implemented types
Mixed-in types

Constructors

CometChatMessagesController({User? user, Group? group, ThreadedMessagesConfiguration? threadedMessagesConfiguration})

Properties

composerPlaceHolder Widget?
getter/setter pair
composerState CometChatMessageComposerController?
getter/setter pair
context BuildContext
getter/setter pair
detailsState CometChatDetailsController?
getter/setter pair
group Group?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
no setterinherited
initialized bool
Checks whether the controller has already been initialized.
no setterinherited
isClosed bool
Checks whether the controller has already been closed.
no setterinherited
isOverlayOpen bool
getter/setter pair
listeners int
no setterinherited
liveAnimationList List<Widget>
getter/setter pair
loggedInUser User?
getter/setter pair
messageComposerKey GlobalKey<State<StatefulWidget>>
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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
getter/setter pair
threadedMessagesConfiguration ThreadedMessagesConfiguration?
threadedMessagesConfiguration sets configuration properties for CometChatThreadedMessages
final
user User?
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
ccGroupCreated(Group group) → void
This will get triggered when a group is created successfully
inherited
ccGroupDeleted(Group group) → void
This will get triggered when a group is deleted successfully
inherited
ccGroupLeft(Action message, User leftUser, Group leftGroup) → void
This will get triggered when logged in user leaves the group
inherited
ccGroupMemberAdded(List<Action> messages, List<User> usersAdded, Group groupAddedIn, User addedBy) → void
This will get triggered when a member is added by logged in user
inherited
ccGroupMemberBanned(Action message, User bannedUser, User bannedBy, Group bannedFrom) → void
This will get triggered when group member is banned from the group by logged in user
inherited
ccGroupMemberJoined(User joinedUser, Group joinedGroup) → void
This will get triggered when logged in user is joined successfully
inherited
ccGroupMemberKicked(Action message, User kickedUser, User kickedBy, Group kickedFrom) → void
This will get triggered when group member is kicked from the group by logged in user
inherited
ccGroupMemberScopeChanged(Action message, User updatedUser, String scopeChangedTo, String scopeChangedFrom, Group group) → void
This will get triggered when group member's scope is changed by logged in user
inherited
ccGroupMemberUnbanned(Action message, User unbannedUser, User unbannedBy, Group unbannedFrom) → void
This will get triggered when a banned group member is unbanned from group by logged in user
inherited
ccLiveReaction(String reaction) → void
override
ccMessageDeleted(BaseMessage message, EventStatus messageStatus) → void
inherited
ccMessageEdited(BaseMessage message, MessageEditStatus status) → void
inherited
ccMessageForwarded(BaseMessage message, List<User>? usersSent, List<Group>? groupsSent, MessageStatus status) → void
inherited
ccMessageRead(BaseMessage message) → void
inherited
ccMessageSent(BaseMessage message, MessageStatus messageStatus) → void
inherited
ccOwnershipChanged(Group group, GroupMember newOwner) → void
This will get triggered when ownership is changed by logged in user
inherited
ccUserBlocked(User user) → void
This will get triggered when the logged in user blocks another user
override
ccUserUnblocked(User user) → void
This will get triggered when the logged in user unblocks another user
override
composerStateCallBack(CometChatMessageComposerController composerState) → dynamic
detailsStateCallBack(CometChatDetailsController detailsState) → dynamic
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
getComposerPlaceHolder() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyChildrens() → void
inherited
onCardMessageReceived(CardMessage cardMessage) → 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
onCustomInteractiveMessageReceived(CustomInteractiveMessage customInteractiveMessage) → void
inherited
onCustomMessageReceived(CustomMessage customMessage) → void
inherited
onFormMessageReceived(FormMessage formMessage) → void
inherited
onInit() → void
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
override
onInteractionGoalCompleted(InteractionReceipt receipt) → void
inherited
onInteractiveMessageReceived(InteractiveMessage message) → void
inherited
onMediaMessageReceived(MediaMessage mediaMessage) → void
inherited
onMessageDeleted(BaseMessage message) → void
inherited
onMessageEdited(BaseMessage message) → void
inherited
onMessageReactionAdded(ReactionEvent reactionEvent) → void
inherited
onMessageReactionRemoved(ReactionEvent reactionEvent) → void
inherited
onMessagesDelivered(MessageReceipt messageReceipt) → void
inherited
onMessagesDeliveredToAll(MessageReceipt messageReceipt) → void
inherited
onMessagesRead(MessageReceipt messageReceipt) → void
inherited
onMessagesReadByAll(MessageReceipt messageReceipt) → void
inherited
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
onSchedulerMessageReceived(SchedulerMessage schedulerMessage) → void
inherited
onTextMessageReceived(TextMessage textMessage) → void
inherited
onThreadRepliesClick(BaseMessage message, BuildContext context, {Widget bubbleView(BaseMessage, BuildContext)?}) → dynamic
onTransientMessageReceived(TransientMessage message) → void
override
onTypingEnded(TypingIndicator typingIndicator) → void
inherited
onTypingStarted(TypingIndicator typingIndicator) → void
inherited
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
setOverLayFalse() → dynamic
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

Operators

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

Static Properties

counter int
getter/setter pair