Polls.castVote constructor

Polls.castVote({
  1. required List children,
  2. required Text question,
  3. required PollCallBack? onVote,
  4. bool allowCreatorVote = false,
  5. Color outlineColor = Colors.blue,
  6. Color backgroundColor = Colors.blueGrey,
  7. TextStyle? pollStyle,
})

this creates view for users to cast votes

Implementation

Polls.castVote({
  required this.children,
  required this.question,
  required this.onVote,
  this.allowCreatorVote = false,
  this.outlineColor = Colors.blue,
  this.backgroundColor = Colors.blueGrey,
  this.pollStyle,
})  : viewType = PollsType.voter,
      userChoice = null,
      highest = null,
      getHighest = null,
      getTotal = null,
      iconColor = null,
      voteData = null,
      currentUser = null,
      creatorID = null,
      leadingBackgroundColor = null,
      leadingPollStyle = null,
      onVoteBackgroundColor = null,
      assert(onVote != null),
      assert(question != null),
      assert(children != null);