toJson method

Map<String, dynamic> toJson()

Converts to a JSON map for the request.

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (mention != null) json['mention'] = mention;
  if (quote != null) json['quote'] = quote;
  if (status != null) json['status'] = status;
  if (reblog != null) json['reblog'] = reblog;
  if (follow != null) json['follow'] = follow;
  if (followRequest != null) json['follow_request'] = followRequest;
  if (favourite != null) json['favourite'] = favourite;
  if (poll != null) json['poll'] = poll;
  if (update != null) json['update'] = update;
  if (quotedUpdate != null) json['quoted_update'] = quotedUpdate;
  if (adminSignUp != null) json['admin.sign_up'] = adminSignUp;
  if (adminReport != null) json['admin.report'] = adminReport;
  return json;
}