toJson method
Implementation
@override
Map<String, Object?> toJson() => {
"recipient": encodeValue(recipient),
"sender_id": encodeValue(senderId),
if (sentAt != null) "sent_at": encodeValue(sentAt),
if (sentVia != null) "sent_via": encodeValue(sentVia),
if (status != null) "status": encodeValue(status),
};