toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final map = <String, dynamic>{};
  map['uid'] = uid;
  map['name'] = name;
  map['link'] = link;
  map['avatar'] = avatar;
  if (metadata != null) {
    map['metadata'] = metadata;
  }
  map['status'] = status;
  map['role'] = role;
  map['statusMessage'] = statusMessage;
  map['tags'] = tags;
  map['hasBlockedMe'] = hasBlockedMe;
  map['blockedByMe'] = blockedByMe;
  map['lastActiveAt'] = lastActiveAt == null ? 0 : lastActiveAt?.millisecondsSinceEpoch;
  // map['updatedAt'] = updatedAt;
  // map['conversationId'] = conversationId;
  return map;
}