dialogs_chatbot_flutter 1.0.0 copy "dialogs_chatbot_flutter: ^1.0.0" to clipboard
dialogs_chatbot_flutter: ^1.0.0 copied to clipboard

EnX Chatbot Flutter Plugin — A complete, drop-in chat UI plugin for the EnableX Dialogs platform. Supports iOS and Android only.

dialogs_chatbot_flutter #

pub.dev License: MIT Platform

Chat screen for EnableX Dialogs bots. Works on iOS and Android.

Migrating from enx_chatbot_flutter? This package was renamed. Change your dependency to dialogs_chatbot_flutter and update the import to package:dialogs_chatbot_flutter/dialogs_chatbot_flutter.dart. Your EnxChatController, EnxBotConfig, and other APIs stay the same. See CHANGELOG.md for full steps.


Quick start (4 steps) #

1. Add these lines to your app’s pubspec.yaml under dependencies: (all three lines are required):

  dialogs_chatbot_flutter: ^1.0.0
  flutter_inappwebview: ^6.1.5
  permission_handler: ^12.0.1

2. Install packages:

flutter pub get

3. Add permissions so camera, gallery, and mic work.

iOS — open ios/Runner/Info.plist and add (you can change the text):

<key>NSCameraUsageDescription</key><string>For chat photos and video.</string>
<key>NSPhotoLibraryUsageDescription</key><string>For chat images and video.</string>
<key>NSPhotoLibraryAddUsageDescription</key><string>To save media from chat.</string>
<key>NSMicrophoneUsageDescription</key><string>For voice and video in chat.</string>

Android — open android/app/src/main/AndroidManifest.xml inside <manifest> (before <application>):

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>

4. Open the chat from a button or screen. Replace your-bot-id with the bot id from your EnableX Dialogs project:

import 'package:dialogs_chatbot_flutter/dialogs_chatbot_flutter.dart';

// Example: open full-screen chat
Navigator.push(
  context,
  MaterialPageRoute(
    builder: (_) => EnxChatScreen(
      config: EnxBotConfig(
        botId: 'your-bot-id',
        host: 'https://dialogs.enablex.io',
      ),
    ),
  ),
);

That’s enough to run the chat.


Put chat inside a page (optional) #

Instead of a new full screen, use a widget where you want:

EnxChatWidget(
  config: EnxBotConfig(
    botId: 'your-bot-id',
    host: 'https://dialogs.enablex.io',
  ),
)

Wrap it in Expanded or SizedBox with height if it sits in a Column.


Optional settings #

  • Colours — pass theme: EnxChatTheme(primaryColor: Colors.indigo) to EnxChatWidget / EnxChatScreen.
  • Extra configEnxBotConfig also has rootPath (usually empty) and callingEnabled (default false) for in-chat calling. See the API docs.
  • EventsEnxChatWidget supports onMessageReceived, onError, and others if you need them.
  • Your own state — use EnxChatController with EnxChatWidget.withController / EnxChatScreen.withController (see API docs).

If something fails #

Problem Try this
Plugin not found / MissingPluginException Keep all three packages in your pubspec.yaml (step 1), then flutter pub get again.
Blank chat or never connects Check botId and host, internet on the device, and Android INTERNET permission.
Camera or gallery on iOS Make sure the four Info.plist keys from step 3 are present.

  • USER_GUIDE.md — full integration guide (setup, widgets, controller, callbacks, troubleshooting)
  • CHANGELOG.md — what changed each version
  • Example app — sample project in example/
  • pub.dev API reference — all classes and parameters

License #

MIT — see LICENSE