CometChatReactionList class
CometChatReactionList is a StatefulWidget that displays the list of reactions for a particular message. It requires reactionRequestBuilder to fetch the reactions of a particular message. It also requires messageObject to fetch the reactions of a particular message. It also requires onTap to perform some action on click of a particular reaction.
CometChatReactionList(
reactionRequestBuilder: ReactionsRequestBuilder(), // Get reactions using a builder
errorStateText: "Error fetching reactions", // Set error text
emptyStateText: "No reactions yet", // Set empty state text
messageObject: messageObject, // Set the message object
onTap: (reaction, message) => print("Tapped reaction: $reaction"), // Handle tap on reaction
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CometChatReactionList
Constructors
- CometChatReactionList.new({Key? key, ReactionsRequestBuilder? reactionRequestBuilder, WidgetBuilder? errorStateView, String? errorStateText, WidgetBuilder? loadingStateView, WidgetBuilder? emptyStateView, String? emptyStateText, Widget? loadingIcon, AvatarStyle? avatarStyle, dynamic onTap(Reaction, BaseMessage)?, ReactionListStyle? reactionListStyle, String? selectedReaction, ListItemStyle? listItemStyle, BaseMessage? messageObject, CometChatTheme? theme})
-
const
Properties
- avatarStyle → AvatarStyle?
-
avatarStyle is a parameter used to set the style for avatar
final
- emptyStateText → String?
-
emptyStateText text to be displayed when the list is empty
final
- emptyStateView → WidgetBuilder?
-
emptyStateView returns view fow empty state
final
- errorStateText → String?
-
errorStateText is a parameter used to show the error state text in case of any error
final
- errorStateView → WidgetBuilder?
-
errorStateView is a parameter used to show the error state view in case of any error
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listItemStyle → ListItemStyle?
-
listItemStyle is a parameter used to set the style for the list item
final
- loadingIcon → Widget?
-
loadingIcon is a parameter used to show the loading icon in case of loading
final
- loadingStateView → WidgetBuilder?
-
loadingStateView is a parameter used to show the loading state view in case of loading
final
- messageObject → BaseMessage?
-
messageObject is a parameter used to set the message object for which the reactions are to be fetched
final
- onTap → dynamic Function(Reaction, BaseMessage)?
-
onTap is a parameter used to perform some action on click of a particular reaction
final
- reactionListStyle → ReactionListStyle?
-
reactionListStyle is a parameter used to set the style for the reaction list
final
- reactionRequestBuilder → ReactionsRequestBuilder?
-
reactionRequestBuilder is a parameter used to fetch the reactions of a particular message
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedReaction → String?
-
selectedReaction is a parameter used to set the selected reaction
final
- theme → CometChatTheme?
-
theme sets custom theme
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CometChatReactionList> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited