EMMessageReaction.fromJson constructor

EMMessageReaction.fromJson(
  1. Map map
)

Implementation

factory EMMessageReaction.fromJson(Map map) {
  String reaction = map["reaction"];
  int count = map["count"];

  bool isAddedBySelf = map["isAddedBySelf"] ?? false;
  List<String> userList = [];
  List<String>? tmp = map.getList("userList");
  if (tmp != null) {
    userList.addAll(tmp);
  }
  return EMMessageReaction._private(
    reaction: reaction,
    userCount: count,
    isAddedBySelf: isAddedBySelf,
    userList: userList,
  );
}