toJson method

  1. @override
Map<String, Object?> toJson()

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),
    };