Vote constructor

Vote({
  1. Int64? proposalId,
  2. String? voter,
  3. @Deprecated('This field is deprecated.') VoteOption? option,
  4. Iterable<WeightedVoteOption>? options,
})

Implementation

factory Vote({
  $fixnum.Int64? proposalId,
  $core.String? voter,
@$core.Deprecated('This field is deprecated.')
  VoteOption? option,
  $core.Iterable<WeightedVoteOption>? options,
}) {
  final _result = create();
  if (proposalId != null) {
    _result.proposalId = proposalId;
  }
  if (voter != null) {
    _result.voter = voter;
  }
  if (option != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.option = option;
  }
  if (options != null) {
    _result.options.addAll(options);
  }
  return _result;
}