CometChatMessageTemplate class

CometChatMessageTemplate class for setting message types and rendering appropriate views in the message list

  CometChatMessageTemplate(
       category: 'category',
       type: 'type',
       bubbleView: (message, context, bubbleAlignment) => Container(),
       headerView: (message, context, bubbleAlignment) => Container(),
       contentView: (message, context, bubbleAlignment) => Container(),
       footerView: (message, context, bubbleAlignment) => Container(),
       bottomView: (message, context, bubbleAlignment) => Container(),
       options: (loggedInUser, messageObject, context, group) =>
           <CometChatMessageOption>[],
     );

Constructors

CometChatMessageTemplate.new({required String type, required String category, Widget? bubbleView(BaseMessage, BuildContext, BubbleAlignment alignment)?, List<CometChatMessageOption>? options(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group)?, Widget? headerView(BaseMessage, BuildContext, BubbleAlignment alignment)?, Widget? footerView(BaseMessage, BuildContext, BubbleAlignment alignment)?, Widget? contentView(BaseMessage, BuildContext, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations})?, Widget? bottomView(BaseMessage, BuildContext, BubbleAlignment alignment)?, Widget? threadView(BaseMessage, BuildContext, BubbleAlignment alignment)?, Widget? statusInfoView(BaseMessage, BuildContext, BubbleAlignment alignment)?})

Properties

bottomView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
bottomView widget to be shown under the statusInfoView of the bubble
getter/setter pair
bubbleView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
bubbleView widget to be shown in the center of the bubble
getter/setter pair
category String
category of the message
getter/setter pair
contentView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment, {AdditionalConfigurations? additionalConfigurations})?
contentView widget to be shown in the center of the bubble
getter/setter pair
footerView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
footerView widget to be shown under the bottomView of the bubble
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headerView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
headerView widget to be shown on the top of the bubble
getter/setter pair
options List<CometChatMessageOption>? Function(User loggedInUser, BaseMessage messageObject, BuildContext context, Group? group)?
options list of options to be shown on the message bubble
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusInfoView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
statusInfoView widget to be shown under the contentView of the bubble
getter/setter pair
threadView Widget? Function(BaseMessage, BuildContext, BubbleAlignment alignment)?
threadView widget to be shown at the bottom of the bubble
getter/setter pair
type String
type of the message
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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