ChatUserStoryConfiguration class

ChatUserStoryConfiguration is a class that configures the chat user story.

Annotations

Constructors

ChatUserStoryConfiguration({required ChatService chatService, required ChatOptions chatOptionsBuilder(BuildContext context), dynamic onPressStartChat()?, dynamic onPressChat(BuildContext, ChatModel)?, dynamic onDeleteChat(BuildContext, ChatModel)?, Future<void> onMessageSubmit(String text)?, Future<void> onReadChat(ChatModel chat)?, Future<void> onUploadImage(Uint8List image)?, dynamic onPressCreateChat(ChatUserModel)?, dynamic onPressCreateGroupChat()?, dynamic onPressCompleteGroupChatCreation(List<ChatUserModel>, String)?, Color? iconColor = Colors.black, Future<bool?> deleteChatDialog(BuildContext, ChatModel)?, bool disableDismissForPermanentChats = false, bool routeToNewChatIfEmpty = true, ChatTranslations translations = const ChatTranslations(), Widget chatPageBuilder(BuildContext context, Widget child)?, dynamic onPressChatTitle(BuildContext context, ChatModel chat)?, dynamic afterMessageSent(String chatId)?, int messagePageSize = 20, dynamic onPressUserProfile()?, double? textfieldBottomPadding = 20, Color? iconDisabledColor = Colors.grey, TextStyle? unreadMessageTextStyle, Widget? loadingWidgetBuilder(BuildContext context)?, Widget usernameBuilder(String userFullName)?, Widget chatTitleBuilder(String chatTitle)?})
Creates a new instance of ChatUserStoryConfiguration.
const

Properties

afterMessageSent → (dynamic Function(String chatId)?)
Called after a new message is sent. This can be used to do something extra like sending a push notification.
final
chatOptionsBuilder → ChatOptions Function(BuildContext context)
final
chatPageBuilder → (Widget Function(BuildContext context, Widget child)?)
Builder for the chat page.
final
chatService → ChatService
The service responsible for handling chat-related functionalities.
final
chatTitleBuilder → (Widget Function(String chatTitle)?)
final
deleteChatDialog → (Future<bool?> Function(BuildContext, ChatModel)?)
Dialog for confirming chat deletion.
final
disableDismissForPermanentChats → bool
Determines whether dismissing is disabled for permanent chats.
final
hashCode → int
The hash code for this object.
no setterinherited
iconColor → Color?
Color of icons.
final
iconDisabledColor → Color?
final
loadingWidgetBuilder → (Widget? Function(BuildContext context)?)
final
messagePageSize → int
The size of each page of messages.
final
onDeleteChat → (dynamic Function(BuildContext, ChatModel)?)
Callback function triggered when a chat is deleted.
final
onMessageSubmit → (Future<void> Function(String text)?)
Callback function for submitting a message.
final
onPressChat → (dynamic Function(BuildContext, ChatModel)?)
Callback function triggered when a chat is pressed.
final
onPressChatTitle → (dynamic Function(BuildContext context, ChatModel chat)?)
Callback function triggered when chat title is pressed.
final
onPressCompleteGroupChatCreation → (dynamic Function(List<ChatUserModel>, String)?)
Builder for chat options based on context.
final
onPressCreateChat → (dynamic Function(ChatUserModel)?)
Callback function triggered when creating a chat.
final
onPressCreateGroupChat → (dynamic Function()?)
final
onPressStartChat → (dynamic Function()?)
Callback function triggered when starting a chat.
final
onPressUserProfile → (dynamic Function()?)
Callback function triggered when user profile is pressed.
final
onReadChat → (Future<void> Function(ChatModel chat)?)
Callback function triggered when a chat is read.
final
onUploadImage → (Future<void> Function(Uint8List image)?)
Callback function for uploading an image.
final
routeToNewChatIfEmpty → bool
If true, the user will be routed to the new chat screen if there are no chats.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textfieldBottomPadding → double?
final
translations → ChatTranslations
Translations for internationalization/localization support.
final
unreadMessageTextStyle → TextStyle?
final
usernameBuilder → (Widget Function(String userFullName)?)
final

Methods

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

Operators

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