toJson method

Map<String, dynamic> toJson()

Generates a JSON object from this object.

Implementation

Map<String, dynamic> toJson() {
  return {
    'text': text,
    'request_contact': requestContact,
    'request_location': requestLocation,
    'request_poll': requestPoll?.toJson(),
    'web_app': webApp?.toJson(),
    'request_users': requestUsers?.toJson(),
    'request_chat': requestChat?.toJson(),
  }..removeWhere(_nullFilter);
}