toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final currentlyActive = this.currentlyActive;
  final lastActiveAgo = this.lastActiveAgo;
  final statusMsg = this.statusMsg;
  return {
    if (currentlyActive != null) 'currently_active': currentlyActive,
    if (lastActiveAgo != null) 'last_active_ago': lastActiveAgo,
    'presence': presence.name,
    if (statusMsg != null) 'status_msg': statusMsg,
  };
}