Architecture
Nexconn Chat UI SDK for Flutter is a thin UI layer on top of ai_nexconn_chat_plugin. It provides ready-made pages, providers, configuration objects, and callback hooks while keeping core messaging semantics in the underlying Nexconn Chat SDK.
Layers
| Layer | Responsibility |
|---|---|
| Nexconn Chat SDK | Connection, channels, messages, friends, groups, and SDK models such as BaseChannel, Message, and NCEngine. |
| Providers | UI state and orchestration for engine, channel list, chat, input, friend, group, profile, audio, and theme. |
| Pages and widgets | Default Flutter screens for channel list, chat, input, message bubbles, previews, forwarding, profiles, friends, and groups. |
| Configuration | ChannelConfig, ChatPageConfig, MessageInputConfig, BubbleConfig, and related configuration objects. |
| Your Flutter app | User identity, token delivery, business profile data, custom routing, permissions, and feature-specific callbacks. |
Provider model
NexconnChatUIProviders installs the app-level providers shared by the Chat UI package:
EngineProvider: initialization, connection state, incoming message events, channel refresh events, local notifications, total unread count, and global feature flags.NexconnThemeProvider: light, dark, and custom theme tokens.
Feature pages create or accept their own scoped providers:
ChannelProvider: channel list loading, pagination, sorting hooks, pin, mute, delete, unread aggregation, and direct-channel online status.ChatProvider: message loading, sending, deletion, delete-for-everyone, forwarding, references, search, unread handling, media helpers, and read-receipt helpers.MessageInputProvider: input mode, draft text, reference preview, mention state, voice recording state, emoji panel, and extension panel.FriendProvider: friend list, search, add, applications, accept, reject, delete, and remark updates.GroupProvider: joined groups, search, create, details, members, management, applications, ownership transfer, and group profile updates.NexconnUserProfileProvider: current-user and target-user profile loading for profile pages.
Main UI entry points
ChannelPage: default channel list screen.ChatPage: chat screen for aBaseChannel.MessageInputWidget: default input area used byChatPage.MessageBubble: default message bubble widget.ForwardSelectPage,PhotoPreviewPage,ShortVideoPreviewPage,FilePreviewPage, andCombineMessageDetailPage: supporting chat pages.FriendPage,FriendSearchPage,FriendAddPage, andFriendApplicationsPage: friend UI.GroupPage,GroupDetailPage,GroupMembersPage,GroupManagePage, and related group pages.NexconnUserProfilePage: user profile UI.
Data flow
- Your Flutter app obtains a user token from your own server.
- The app initializes and connects through
EngineProvider. ChannelPagecreates or receives aChannelProviderand loads channels from the Nexconn SDK.- Selecting a channel opens
ChatPagewith the selectedBaseChannel. ChatPagecreates or receives aChatProvider, loads messages, and sends message params throughBaseChannel.- Incoming SDK events reach
EngineProvider; scoped providers refresh the visible UI.
Design principles
- Public APIs use Nexconn, Channel, Chat, Friend, and Group naming.
- SDK objects are reused directly instead of duplicated in the UI layer.
- Business data is injectable through resolvers, callbacks, and config objects.
- Platform permissions and business-specific flows stay in your app.
- Unsupported platform or business features are exposed as callbacks, disabled by default, or omitted from the default UI.