toJson method

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

Converts the ChatBoostSourceGiveaway object to a JSON object.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': type.value,
    'user': user?.toJson(),
    'is_unclaimed': isUnclaimed,
    'giveaway_message_id': giveawayMessageId,
    'prize_star_count': prizeStarCount,
  }..removeWhere(_nullFilter);
}