Intellicon Chat SDK Integration
Getting Started
To get started with the Intellicon Chat SDK, run the following command in your terminal:
flutter pub add intellicon_chat_sdk
Usage
Add the following code snippet to any button click event or wherever you want to initiate the chat:
Navigator.push<void>(
context,
MaterialPageRoute(
builder: (context) => Chat(
config: Config(
baseUrl: "YOUR DOMAIN",
appId: "YOUR CHAT BOT APP ID"
),
user: User(
participantId: "ANY UNIQUE IDENTIFIER",
name: "USER NAME WHOM IS USING THE CHAT BOT",
fcmToken: "FOR NOTIFICATION ADD YOUR FIREBASE CLOUD MESSAGING TOKEN HERE" // Optional
),
chatStyle: ChatStyle(
appBarColor: Colors.black,
appBarTextColor: Colors.white,
bubbleStyle: BubbleStyle(visitorBgColor: Colors.blueGrey),
),
),
fullscreenDialog: true,
),
);
Configuration
- baseUrl: The base URL of your domain where the chat service is hosted.
- appId: The unique identifier for your chat bot application.
- participantId: A unique identifier for the user participating in the chat.
- name: The name of the user using the chat bot.
- fcmToken: (Optional) The Firebase Cloud Messaging token for enabling notifications.
Chat Style Customization
- appBarColor: The color of the app bar.
- appBarTextColor: The color of the text in the app bar.
- bubbleStyle: Customize the chat bubble style.
- visitorBgColor: The background color of the visitor's chat bubble.
Libraries
- helper/_message
- helper/_socket_data
- helper/_token
- helper/_token_data
- intellicon_chat_sdk
- models/bubble_style
- models/chat_style
- models/config
- models/feedback_message
- models/user
- screens/chat
- services/attachment
- services/hive_store
- services/socket
- utils/logs
- utils/time
- widgets/attachment_modal
- widgets/audio_player
- widgets/chat_feedback
- widgets/document_bubble
- widgets/full_screen_image
- widgets/image_bubble
- widgets/message_bubble
- widgets/message_text
- widgets/video_bubble
- widgets/video_player