Skip to content

Commit 92feb53

Browse files
Sahil-Simformdhyash-simform
authored andcommitted
doc: 📝 Updated readme
1 parent 4d00a79 commit 92feb53

File tree

1 file changed

+2
-136
lines changed

1 file changed

+2
-136
lines changed

doc/documentation.md

Lines changed: 2 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Add the following keys to your _Info.plist_ file, located in `<project root>/ios
8080
```
8181

8282
* This plugin requires iOS 10.0 or higher. Add this line in `Podfile`:
83-
```
83+
```ruby
8484
platform :ios, '10.0'
8585
```
8686

@@ -672,140 +672,6 @@ _chatController.setTypingIndicator = true; // for showing indicator
672672
_chatController.setTypingIndicator = false; // for hiding indicator
673673
```
674674

675-
# API References
676-
677-
This document provides a reference for the main classes and their properties in the ChatView package.
678-
679-
## ChatView
680-
681-
The main widget for implementing a chat interface.
682-
683-
### Properties
684-
685-
| Property | Type | Description |
686-
|------------------------------|-----------------------------------------------|-------------------------------------------------------|
687-
| `chatController` | `ChatController` | Controller for managing messages and chat state |
688-
| `onSendTap` | `Function(String, ReplyMessage, MessageType)` | Callback when send button is tapped |
689-
| `chatViewState` | `ChatViewState` | Current state of the chat view (loading, error, etc.) |
690-
| `appBar` | `ChatViewAppBar` | Custom app bar for the chat view |
691-
| `chatBackgroundConfig` | `ChatBackgroundConfiguration` | Configuration for chat background |
692-
| `sendMessageConfig` | `SendMessageConfiguration` | Configuration for send message section |
693-
| `chatBubbleConfig` | `ChatBubbleConfiguration` | Configuration for chat bubbles |
694-
| `swipeToReplyConfig` | `SwipeToReplyConfiguration` | Configuration for swipe to reply feature |
695-
| `messageConfig` | `MessageConfiguration` | Configuration for messages |
696-
| `reactionPopupConfig` | `ReactionPopupConfiguration` | Configuration for reaction popup |
697-
| `replyPopupConfig` | `ReplyPopupConfiguration` | Configuration for reply popup |
698-
| `repliedMessageConfig` | `RepliedMessageConfiguration` | Configuration for replied messages |
699-
| `typeIndicatorConfig` | `TypeIndicatorConfiguration` | Configuration for typing indicator |
700-
| `featureActiveConfig` | `FeatureActiveConfig` | Configuration to enable/disable features |
701-
| `replySuggestionsConfig` | `ReplySuggestionsConfig` | Configuration for reply suggestions |
702-
| `emojiPickerSheetConfig` | `Config` | Configuration for emoji picker |
703-
| `isLastPage` | `bool` | Whether this is the last page of messages |
704-
| `loadMoreData` | `Function` | Callback to load more messages for pagination |
705-
| `replyMessageBuilder` | `Widget Function(BuildContext, ReplyMessage)` | Builder for custom reply message UI |
706-
| `scrollToBottomButtonConfig` | `ScrollToBottomButtonConfig` | Configuration for scroll to bottom button |
707-
708-
## ChatController
709-
710-
Manages the state of the chat view.
711-
712-
### Properties
713-
714-
| Property | Type | Description |
715-
|----------------------|--------------------|--------------------------------|
716-
| `initialMessageList` | `List<Message>` | Initial list of messages |
717-
| `scrollController` | `ScrollController` | Controller for the scroll view |
718-
| `currentUser` | `ChatUser` | The current user |
719-
| `otherUsers` | `List<ChatUser>` | Other users in the chat |
720-
721-
### Methods
722-
723-
| Method | Parameters | Return Type | Description |
724-
|--------------------------|----------------------------------------|-------------|------------------------------------|
725-
| `addMessage` | `Message message` | `void` | Adds a message to the chat |
726-
| `setTypingIndicator` | `bool value` | `void` | Shows/hides typing indicator |
727-
| `addReplySuggestions` | `List<SuggestionItemData> suggestions` | `void` | Adds reply suggestions |
728-
| `removeReplySuggestions` | None | `void` | Removes reply suggestions |
729-
| `loadMoreData` | None | `void` | Loads more messages for pagination |
730-
731-
## Message
732-
733-
Represents a chat message.
734-
735-
### Properties
736-
737-
| Property | Type | Description |
738-
|------------------------|------------------|-----------------------------------------------|
739-
| `id` | `String` | Unique identifier for the message |
740-
| `message` | `String` | The message content |
741-
| `createdAt` | `DateTime` | When the message was created |
742-
| `sentBy` | `String` | ID of the user who sent the message |
743-
| `replyMessage` | `ReplyMessage?` | The message being replied to, if any |
744-
| `messageType` | `MessageType` | Type of message (text, image, voice, custom) |
745-
| `reaction` | `Reaction?` | Reaction to the message, if any |
746-
| `status` | `MessageStatus?` | Status of the message (sent, delivered, read) |
747-
| `voiceMessageDuration` | `Duration?` | Duration of voice message, if applicable |
748-
749-
## ChatUser
750-
751-
Represents a user in the chat.
752-
753-
### Properties
754-
755-
| Property | Type | Description |
756-
|--------------------------|-------------|-----------------------------------------------|
757-
| `id` | `String` | Unique identifier for the user |
758-
| `name` | `String` | Name of the user |
759-
| `profilePhoto` | `String?` | URL or path to profile photo |
760-
| `isProfilePhotoInBase64` | `bool` | Whether the profile photo is in base64 format |
761-
| `imageType` | `ImageType` | Type of image (asset, network, base64) |
762-
763-
## ChatBubbleConfiguration
764-
765-
Configuration for chat bubbles.
766-
767-
### Properties
768-
769-
| Property | Type | Description |
770-
|----------------------------|-----------------------------|-----------------------------------------|
771-
| `outgoingChatBubbleConfig` | `ChatBubble` | Configuration for outgoing chat bubbles |
772-
| `inComingChatBubbleConfig` | `ChatBubble` | Configuration for incoming chat bubbles |
773-
| `onDoubleTap` | `Function?` | Callback when a bubble is double-tapped |
774-
| `linkPreviewConfig` | `LinkPreviewConfiguration?` | Configuration for link previews |
775-
776-
## FeatureActiveConfig
777-
778-
Configuration to enable/disable features.
779-
780-
### Properties
781-
782-
| Property | Type | Description |
783-
|--------------------------------|--------|---------------------------------------------|
784-
| `enableSwipeToReply` | `bool` | Whether to enable swipe to reply |
785-
| `enableSwipeToSeeTime` | `bool` | Whether to enable swipe to see message time |
786-
| `enablePagination` | `bool` | Whether to enable message pagination |
787-
| `enableOtherUserName` | `bool` | Whether to show other user names |
788-
| `lastSeenAgoBuilderVisibility` | `bool` | Whether to show last seen ago |
789-
| `receiptsBuilderVisibility` | `bool` | Whether to show message receipts |
790-
## SendMessageConfiguration
791-
792-
Configuration for send message section.
793-
794-
### Properties
795-
796-
| Property | Type | Description |
797-
|-------------------------------|---------------------------------|----------------------------------------|
798-
| `textFieldConfig` | `TextFieldConfiguration` | Configuration for text field |
799-
| `enableCameraImagePicker` | `bool` | Whether to enable camera image picker |
800-
| `enableGalleryImagePicker` | `bool` | Whether to enable gallery image picker |
801-
| `imagePickerIconsConfig` | `ImagePickerIconsConfiguration` | Configuration for image picker icons |
802-
| `voiceRecordingConfiguration` | `VoiceRecordingConfiguration` | Configuration for voice recording |
803-
| `cancelRecordConfiguration` | `CancelRecordConfiguration` | Configuration for cancel record button |
804-
| `replyMessageColor` | `Color` | Color for reply message |
805-
| `replyDialogColor` | `Color` | Color for reply dialog |
806-
| `replyTitleColor` | `Color` | Color for reply title |
807-
| `closeIconColor` | `Color` | Color for close icon |
808-
809675
# Contributors
810676

811677
## Main Contributors
@@ -837,7 +703,7 @@ If you find any bugs or have feature requests, please create an issue in the [is
837703

838704
# License
839705

840-
```text
706+
```
841707
MIT License
842708
Copyright (c) 2022 Simform Solutions
843709
Permission is hereby granted, free of charge, to any person obtaining a copy

0 commit comments

Comments
 (0)