IGroupMsgParser class
群聊消息解析
IGroupMsgModel? parserGroup(V2TimMessage v2timMessage) {
IGroupMsgModel iGroupMsgModel = IGroupMsgModel();
iGroupMsgModel.v2timMessage = v2timMessage;
var result = v2timMessage.customElem?.data;
if (result != null) {
//解析出type和data
Map jsonDate = json.decode(result);
iGroupMsgModel.action = jsonDate"type"
.toString();
iGroupMsgModel.data = jsonDate"data"
;
}
return iGroupMsgModel;
}
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parserGroup(
V2TimMessage v2timMessage) → IGroupMsgModel? -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited