toJson method

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

Object to Map serializer

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '@type': 'sponsoredMessage',
    if (extra != null) '@extra': extra,
    'message_id': message_id,
    'is_recommended': is_recommended,
    'content': content,
    'sponsor': sponsor,
    'additional_info': additional_info
  };
}