OrganizationSettings constructor

const OrganizationSettings({
  1. @JsonKey.new(name: 'downvotesEnabled', defaultValue: false) @Default.new(false) bool downvotesEnabled,
  2. @JsonKey.new(name: 'defaultSortingOrder', required: true) required String defaultSortingOrder,
  3. @JsonKey.new(name: 'hideVoteCountUntilVoted', defaultValue: false) @Default.new(false) bool hideVoteCountUntilVoted,
})

Implementation

const factory OrganizationSettings({
  /// Downvotes feature enabled
  @JsonKey(name: 'downvotesEnabled', defaultValue: false)
  @Default(false)
  bool downvotesEnabled,

  /// Default sorting order of posts
  @JsonKey(name: 'defaultSortingOrder', required: true)
  required String defaultSortingOrder,

  /// Hide vote counts until voted
  @JsonKey(name: 'hideVoteCountUntilVoted', defaultValue: false)
  @Default(false)
  bool hideVoteCountUntilVoted,
}) = _OrganizationSettings;