Property | Type | Description |
messageList | Barrage message list of the current room, supports real-time updates and can be subscribed to. |
Function | Description |
Create barrage management instance. | |
Send text barrage. | |
Send custom barrage. | |
Add local tip message. |
static BarrageStore create(String liveID) {return StoreFactory.shared.getStore<BarrageStore>(liveID: liveID);}
Parameter | Type | Required | Description |
liveID | String | Required | Live room ID. |
Future<CompletionHandler> sendTextMessage({required String text,Map<String, String>? extensionInfo,});
Parameter | Type | Required | Description |
text | String | Required | Text barrage content. |
extensionInfo | Map<String, String>? | Required | Extension information, can contain custom fields (such as specifying barrage color, font size, etc.). |
Future<CompletionHandler> sendCustomMessage({required String businessID,required String data,});
Parameter | Type | Required | Description |
businessID | String | Required | Business identifier ID, used to distinguish custom barrages from different business scenarios. |
data | String | Required | Custom data content, usually JSON format string, used to pass business custom data. |
void appendLocalTip(Barrage message);
Parameter | Type | Required | Description |
message | Required | Local barrage message (such as system tips, operation feedback, etc., visible only to the current user). |
Enum Value | Value | Description |
text | 0 | Text type barrage, contains plain text content. |
custom | 1 | Custom type barrage, supports business custom data format (such as barrages with special effects, interactive messages, etc.). |
Property | Type | Description |
liveID | String | Unique identifier ID of the live room/voice chat room the barrage belongs to. |
sender | User information of the barrage sender (such as user ID, nickname, avatar, etc.). | |
sequence | int | Unique sequence ID of the barrage message, used for message sorting and deduplication. |
timestampInSecond | int | Barrage sending timestamp (unit: seconds), used to display sending time order. |
messageType | Barrage message type (text or custom). | |
textContent | String | Message content of text type barrage, i.e., the text content of the barrage. |
extensionInfo | Map<String, String> | Barrage extension information, customizable fields (such as display style, priority, etc.). Valid when messageType is TEXT. |
businessID | String | Business identifier ID of custom type barrage, used to distinguish custom barrages from different business scenarios. |
data | String | Specific data content of custom type barrage (usually JSON format string), valid when messageType is CUSTOM. |
Property | Type | Description |
messageList | Barrage message list of the current room, supports real-time updates and can be subscribed to. |
Feedback