connect_x_flutter_livechat_sdk 0.0.2
connect_x_flutter_livechat_sdk: ^0.0.2 copied to clipboard
Connect X Flutter Live Chat SDK
import 'package:connect_x_flutter_livechat_sdk/connect_x_flutter_livechat_sdk.dart';
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => ChatScreen(
onClose: () {
Navigator.of(context).pop(); // Close the chat screen
},
token:
'YOUR_TOKEN', // Replace with your actual token
orgId: 'YOUR_ORG_ID', // Replace with your actual org ID
channelId: 'YOUR_CHANNEL', // Replace with your actual channel ID
externalValue: 'YOUR_EXTERNAL_VALUE', // Replace with a unique user identifier
// You can also pass a custom header if needed:
// customHeader: MyCustomHeaderWidget(),
),
),
);