toJson method

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

Converts an object to JSON.

Implementation

@override
Map<String, dynamic> toJson() {
  final returnValue = <String, dynamic>{
    "\$": "0x2b085862",
    "flags": flags,
    "out": out,
    "mentioned": mentioned,
    "mediaUnread": mediaUnread,
    "silent": silent,
    "post": post,
    "legacy": legacy,
    "id": id,
    "fromId": fromId,
    "peerId": peerId,
    "replyTo": replyTo,
    "date": date.toIso8601String(),
    "action": action,
    "ttlPeriod": ttlPeriod,
  };

  // Finished toJson.
  return returnValue;
}