LikeComment constructor

  1. @JsonSerializable.new(includeIfNull: false)
const LikeComment({
  1. @JsonKey.new(name: 'comment_id') required int commentId,
  2. required int score,
  3. required String auth,
  4. String? emoji,
  5. bool? private,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory LikeComment({
  /// The comment to vote on.
  @JsonKey(name: 'comment_id') required int commentId,

  /// 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,
}) = _LikeComment;