toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  final avatarUrl = this.avatarUrl;
  final displayName = this.displayName;
  return {
    if (avatarUrl != null) 'avatar_url': avatarUrl.toString(),
    if (displayName != null) 'display_name': displayName,
    'user_id': userId,
  };
}