toJson method
Implementation
Map<String, Object?> toJson() {
final avatarUrl = this.avatarUrl;
final displayname = this.displayname;
return {
if (avatarUrl != null) 'avatar_url': avatarUrl.toString(),
if (displayname != null) 'displayname': displayname,
};
}