Polls.castVote constructor

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

this creates view for users to cast votes

Implementation

const Polls.castVote({super.key,
  required this.children,
  required this.question,
  required this.onVote,
  this.allowCreatorVote = false,
  this.outlineColor = Colors.blue,
  this.backgroundColor = Colors.blueGrey,
  this.pollStyle = const TextStyle(),
})  : 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);