twilio_chat_conversation 1.0.1 twilio_chat_conversation: ^1.0.1 copied to clipboard
A Flutter plugin for Twilio Conversations which allows you to build engaging conversational messaging experiences on iOS and Android platforms.
Introduction #
A Flutter plugin for Twilio Conversations which allows you to build engaging conversational messaging experiences for Android and iOS. Currently this plugin only supports Android platform.
This package is currently in development phase and should not be used for production apps.
Supported platforms #
- Android
- iOS (in progress)
Example #
Check out the example
Usage #
Obtain an instance #
final TwilioChatConversation twilioChatConversationPlugin = TwilioChatConversation();
Generate token and authenticate user #
final String? result = await twilioChatConversationPlugin.generateToken(accountSid:credentials['accountSid'],apiKey:credentials['apiKey'],apiSecret:credentials['apiSecret'],identity:credentials['identity'],serviceSid: credentials['serviceSid']);
Create new conversation #
final String? result = await twilioChatConversationPlugin.createConversation(conversationName:conversationName, identity: identity);
Get list of conversations for logged in user #
final List result = await twilioChatConversationPlugin.getConversations() ?? [];
Get messages from the specific conversation #
final List result = await twilioChatConversationPlugin.getMessages(conversationId: conversationId) ?? [];
Join the existing conversation #
final String? result = await twilioChatConversationPlugin.joinConversation(conversationId:conversationId);
Send message #
final String? result = await twilioChatConversationPlugin.sendMessage(message:enteredMessage,conversationId:conversationId);
Add participant in a conversation #
final String? result = await twilioChatConversationPlugin.addParticipant(participantName:participantName,conversationId:conversationId);
Get participants from the specific conversation #
final List result = await twilioChatConversationPlugin.getParticipants(conversationId: conversationId) ?? [];
License #
Issues and feedback #
If you have any suggestions for including a feature or if something doesn't work, feel free to open a Github issue or to open a pull request, you are more than welcome to contribute!
Contributor #
- Sachin Pandit (ZingWorks LLP)