This Flutter plugin supports messaging using live chat service.
Add this to your package's pubspec.yaml file, use git dependency with specific branch
dependencies:
livechat_sdk:
git:
url: https://github.com/tieunt0906/livechat_sdk.git
ref: develop
then run flutter pub get
to install package
First you need to create chat client to initiate connection with baseUrl and appId parameters
final client = LivechatClient(
baseUrl: 'websocket url',
appId: 'your app id',
);
Currently, this package supports you to send 6 message types
- Text
client.sendTextMessage('your text message');
- Image
client.sendImage('imageUrl', text: 'description');
- Audio
client.sendAudio('audioUrl', text: 'description');
- Video
client.sendVideo('videoUrl', text: 'description');
- File
client.sendFile('fileUrl', text: 'description');
- Gallery
client.sendImages(['imageUrl'], text: 'description');