V2TimMessageReaction.fromJson constructor

V2TimMessageReaction.fromJson(
  1. Map json
)

Implementation

V2TimMessageReaction.fromJson(Map json) {
  json = Utils.formatJson(json);
  reactionID = json['reactionID'] ?? "";
  totalUserCount = json['totalUserCount'] ?? 0;
  if (json['partialUserList'] != null) {
    partialUserList = List.empty(growable: true);
    json['partialUserList'].forEach((v) {
      partialUserList.add(V2TimUserInfo.fromJson(v));
    });
  } else {
    partialUserList = [];
  }
  reactedByMyself = json['reactedByMyself'] ?? false;
}