Flutter
Use Dart to connect wukongimfluttersdk and manage connections, messages, conversations, and channel profiles.
wukongimfluttersdk is the full WuKongIM SDK for Flutter. It manages the persistent connection, message delivery, local sqflite data, conversation list, and channel profiles for Flutter apps that own their chat UI.
These guides target wukongimfluttersdk 1.7.9 and use Dart throughout. The package depends on dart:io and sqflite, so it is not for Flutter Web.
Before you start
Prepare:
- a reachable WuKongIM service;
- two test users, such as
aliceandbob; - a
uid,token, andhost:portreturned by your application server; - a Flutter project with its Android or iOS native configuration complete.
Where does the token come from?
Your application server should create the token and return it to an authenticated user. Never put a WuKongIM admin secret in the app or let the app call an admin API to create tokens.
Recommended order
Quickstart
Install the SDK, connect a user, and send the first online text message.
Connection
Understand setup, synchronization states, disconnect, and logout.
Messages
Send, receive, query, and update message states.
Conversations
Build the chat list and maintain unread counts.
Channels
Load user, group, and group-member profiles.
Advanced
Add custom content, media upload, and remote history.
Read Core Concepts first if “channel” or “conversation” is unfamiliar. Open the API Reference when you only need a method name.