LikePost constructor
- @JsonSerializable.new(includeIfNull: false)
const
LikePost(
{ - @JsonKey.new(name: 'post_id') required int postId,
- required int score,
- required String auth,
- String? emoji,
- bool? private,
})
Implementation
@JsonSerializable(includeIfNull: false)
const factory LikePost({
/// The post to vote on.
@JsonKey(name: 'post_id') required int postId,
/// The vote score: 1 = upvote, -1 = downvote, 0 = remove vote.
required int score,
/// Auth token.
required String auth,
/// Optional emoji for the vote.
String? emoji,
/// Whether the vote is private.
bool? private,
}) = _LikePost;