CometChatTextFormatter class abstract
CometChatTextFormatter is an abstract class which is used to format the text It has properties like trackingCharacter, pattern, onSearch, showLoadingIndicator, messageBubbleTextStyle, messageInputTextStyle It has methods like init, handlePreMessageSend, onScrollToBottom, buildInputFieldText, mergeAttributedText, getAttributedText, onChange, getLoadingIndicator, getMessageInputTextStyle, getMessageBubbleTextStyle
- Implemented types
Constructors
-
CometChatTextFormatter.new({String? trackingCharacter, RegExp? pattern, dynamic onSearch(String?)?, bool? showLoadingIndicator, TextStyle messageBubbleTextStyle(CometChatTheme theme, BubbleAlignment? alignment, {bool forConversation})?, TextStyle messageInputTextStyle(CometChatTheme theme)?, BaseMessage? message, CometChatTheme? theme, Map<
String, dynamic> ? composerId, StreamSink<List< ? suggestionListEventSink, StreamSink<SuggestionListItem> >String> ? previousTextEventSink, User? user, Group? group, UsersRequestBuilder? usersRequestBuilder, GroupMembersRequestBuilder? groupMembersRequestBuilder})
Properties
-
composerId
↔ Map<
String, dynamic> ? -
composerId is a Map which is used to store the composer id
getter/setter pair
- group ↔ Group?
-
set group for the formatter
getter/setter pair
- groupMembersRequestBuilder ↔ GroupMembersRequestBuilder?
-
groupMembersRequestBuilder is a GroupMembersRequestBuilder object which is used to get the group members
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ BaseMessage?
-
message is a BaseMessage which is used to store the message
getter/setter pair
- messageBubbleTextStyle ↔ TextStyle Function(CometChatTheme theme, BubbleAlignment? alignment, {bool forConversation})?
-
messageBubbleTextStyle is a function which is used to style the message bubble text with formatting
getter/setter pair
- messageInputTextStyle ↔ TextStyle Function(CometChatTheme theme)?
-
messageBubbleTextStyle is a function which is used to style the message composer input text with formatting
getter/setter pair
- onSearch ↔ dynamic Function(String?)?
-
onSearch is a function which is used to perform some action when the text is searched
getter/setter pair
- pattern ↔ RegExp?
-
pattern is a regular expression which is used to match the pattern
getter/setter pair
-
previousTextEventSink
↔ StreamSink<
String> ? -
previousTextEventSink is a StreamSink which is used to store the previous text event sink
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLoadingIndicator ↔ bool?
-
showLoadingIndicator is a boolean value which is used to show or hide the loading indicator
getter/setter pair
-
suggestionListEventSink
↔ StreamSink<
List< ?SuggestionListItem> > -
suggestionListEventSink is a StreamSink which is used to store the suggestion list event sink
getter/setter pair
- theme ↔ CometChatTheme?
-
theme is a CometChatTheme which is used to store the theme
getter/setter pair
- trackingCharacter ↔ String?
-
trackingCharacter is a string value which is used to track the character
getter/setter pair
- user ↔ User?
-
sets user for the formatter
getter/setter pair
- usersRequestBuilder ↔ UsersRequestBuilder?
-
usersRequestBuilder is a UsersRequestBuilder object which is used to get the users
getter/setter pair
Methods
-
buildInputFieldText(
{required BuildContext context, TextStyle? style, required bool withComposing, required String text, List< AttributedText> ? existingAttributes, CometChatTheme? theme}) → List<AttributedText> - buildInputFieldText is a function which is used to style the text in the input field in the message composer
-
getAttributedText(
String text, CometChatTheme theme, BubbleAlignment? alignment, {List< AttributedText> ? existingAttributes, dynamic onTap(String)?, bool forConversation = false}) → List<AttributedText> - getAttributedText is a function which is used to get the attributed text which is used to style the text in the message bubble and conversation subtitle
-
getLoadingIndicator(
BuildContext context, CometChatTheme theme) → Widget - getLoadingIndicator is a widget which is used to show the loading indicator
-
getMessageBubbleTextStyle(
CometChatTheme theme, BubbleAlignment? alignment, {bool forConversation = false}) → TextStyle - getMessageBubbleTextStyle is a TextStyle object which is used to style the message bubble text
-
getMessageInputTextStyle(
CometChatTheme theme) → TextStyle - getMessageInputTextStyle is a TextStyle object which is used to style the message input text
-
handlePreMessageSend(
BuildContext context, BaseMessage baseMessage) → void - handlePreMessageSend is a function which is used to perform some action before sending the message
-
init(
) → void -
mergeAttributedText(
List< AttributedText> attributedTexts, List<AttributedText> existingAttributedTexts) → List<AttributedText> - mergeAttributedText is a function which is used to merge the attributed text of various formatters
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
TextEditingController textEditingController, String previousText) → void - onChange is a function which is used to perform some action when the text is changed
-
onScrollToBottom(
TextEditingController textEditingController) → void - onScrollToBottom is a function which is used to perform some action when the scroll reaches the bottom of the suggestion list
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited