Skip to main content

Import the SDK

The Flutter package name is ai_nexconn_chatui_plugin. It exposes the Chat UI layer and re-exports the Nexconn SDK types that appear in UI APIs, including BaseChannel, Message, NCEngine, ChannelType, MessageType, InitParams, and ConnectParams.

Chat UI 26.2.6 is released alongside ai_nexconn_chat_plugin ^26.2.6. They are separate packages: the UI package provides pages, providers, configuration, and callbacks, while the Chat SDK package provides the underlying IM engine and models.

Requirements

ItemRequirement
Flutter3.29.2 or later
DartCompatible with 3.9.2
AndroidSupported by the underlying ai_nexconn_chat_plugin; add only the permissions needed by the media features your app enables
iOSSupported by the underlying ai_nexconn_chat_plugin; add only the privacy usage descriptions needed by the media features your app enables

Release channel

Use the package version supplied by your Nexconn release channel or private registry. The Chat UI package and the underlying Chat SDK package are version-aligned for this release, but they remain separate packages. Do not mix a Chat UI package from one channel with an App Key, token, or endpoint from another environment.

Add the dependency

Use the version supplied by your Nexconn release channel.

yaml
dependencies:
ai_nexconn_chatui_plugin: ^26.2.6

Then fetch packages:

bash
flutter pub get

Import the public entry point

Dart
import 'package:ai_nexconn_chatui_plugin/ai_nexconn_chatui_plugin.dart';

This single import is enough for NexconnChatUIProviders, EngineProvider, ChannelPage, ChatPage, configuration objects, and the Nexconn SDK models used by the UI layer.

Platform permissions

Only request permissions for features your app actually exposes. The Chat UI package can show media entry points, but your app remains responsible for platform permission prompts and any custom media picker flow you add.

FeatureAndroidiOS
Basic chat and channel listINTERNET, ACCESS_NETWORK_STATENo additional privacy usage key
Local notificationsPOST_NOTIFICATIONS on Android 13+Notification authorization requested by your app
Camera photoCAMERANSCameraUsageDescription
Direct short-video recordingCAMERA, RECORD_AUDIONSCameraUsageDescription, NSMicrophoneUsageDescription
Voice recordingRECORD_AUDIONSMicrophoneUsageDescription
Gallery mediaREAD_MEDIA_IMAGES, READ_MEDIA_VIDEO on Android 13+NSPhotoLibraryUsageDescription
Location messageLocation permission if your picker reads device locationNSLocationWhenInUseUsageDescription
File messageDepends on the file picker used by your appDepends on the file picker used by your app

Android

Common media features may need these permissions in android/app/src/main/AndroidManifest.xml:

xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Required for Android 13+ local notifications -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- Required for voice messages -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Required for camera and video -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- Required for image picker on Android 13+ -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

Use permission_handler or your own permission flow before opening camera, microphone, gallery, or file features. The built-in Chat UI media entries request only the selected feature's permissions: camera photos do not request gallery access first, album photo/video entries request media-library access, and direct Android short-video recording requests camera plus microphone.

iOS

Add the relevant privacy usage descriptions to ios/Runner/Info.plist:

xml
<key>NSCameraUsageDescription</key>
<string>This app uses the camera to send photos and videos.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app uses the microphone to record voice messages.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app uses the photo library to select media for messages.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app uses location when you choose to send a location message.</string>

Next step

Continue with Initialization.