Barrage class

Barrage data model, containing complete attribute information of a single barrage.

Contains complete information about the barrage sender, content, type, etc.

Property Overview

Property Type Description
liveID String Unique identifier ID of the live room/voice chat room the barrage belongs to
sender LiveUserInfo User information of the barrage sender
sequence int Unique sequence ID of the barrage message
timestampInSecond int Barrage sending timestamp (unit: seconds)
messageType BarrageType Barrage message type (text or custom)
textContent String Message content of text type barrage
extensionInfo Map<String, String> Barrage extension information
businessID String Business identifier ID of custom type barrage
data String Specific data content of custom type barrage

Constructors

Barrage({String liveID = '', LiveUserInfo? sender, int sequence = 0, int timestampInSecond = 0, BarrageType messageType = BarrageType.text, String textContent = '', Map<String, String>? extensionInfo, String businessID = '', String data = ''})

Properties

businessID String
Business identifier ID of custom type barrage, used to distinguish custom barrages from different business scenarios.
getter/setter pair
data String
Specific data content of custom type barrage (usually JSON format string), valid when messageType is CUSTOM.
getter/setter pair
extensionInfo Map<String, String>
Barrage extension information, customizable fields (such as display style, priority, etc.). Valid when messageType is TEXT.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
liveID String
Unique identifier ID of the live room/voice chat room the barrage belongs to.
getter/setter pair
messageType BarrageType
Barrage message type (text or custom).
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sender LiveUserInfo
User information of the barrage sender (such as user ID, nickname, avatar, etc.).
getter/setter pair
sequence int
Unique sequence ID of the barrage message, used for message sorting and deduplication.
getter/setter pair
textContent String
Message content of text type barrage, i.e., the text content of the barrage.
getter/setter pair
timestampInSecond int
Barrage sending timestamp (unit: seconds), used to display sending time order.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited