qiscus_multichannel_widget

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

qiscus multichannel widget

Qiscus Multichannel Widget #
Requirements #

dart sdk: >=2.16.0 <3.0.0
flutter sdk: >=2.10.0

Installation #
# Qiscus Multichannel main package
flutter pub add qiscus_multichannel_widget
copied to clipboard
How To Use #
Initialization #
In order to use QiscusMultichannelWidget, you need to initialize it with your AppID (YOUR_APP_ID). Get more information to get AppID from Qiscus Multichannel Chat page
// Wrap your outer most component with `QMultichannelProvider`
// for example
import 'package:qiscus_multichannel_widget/qiscus_multichannel_widget.dart';

QMultichannelProvider(
appId: appId,
builder: (context) {
return MaterialApp(
home: _buildNavigator(),
);
},
);
copied to clipboard
After the initialization, you can access all the widget's functions.
Set The User #
Set UserId before start the chat, this is mandatory.
QMultichannelConsumer(
builder: (_, QMultichannel ref) {
ref.setUser(
userId: 'guest-1001',
displayName: 'guest-1001',
);
ref.initiateChat();

return Container();
},
),
copied to clipboard
Get Login Status #
Use this function to check whether the user has already logged in.
QMultichannelConsumer(
builder: (_, QMultichannel ref) {
if (ref.account.hasValue == true) {
// User already logged in
}
return Container();
},
),
copied to clipboard
Start Chat #
Use this function to start a chat.
QMultichannelConsumer(
builder: (_, QMultichannel ref) {
ref.initiateChat();
return Container();
},
),
copied to clipboard
Clear User #
Use this function to clear the logged-in users.
QMultichannelConsumer(
builder: (_, QMultichannel ref) {
ref.clearUser();
return Container();
},
),
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.