Polls.castVote constructor
const
Polls.castVote({
- Key? key,
- required List<
PollOption> children, - required Widget? question,
- required PollCallBack? onVote,
- bool allowCreatorVote = false,
- Color onVoteBorderColor = Colors.blue,
- Color backgroundColor = Colors.grey,
- Color? voteCastedBackgroundColor = Colors.blueGrey,
- TextStyle? pollStyle,
- double optionBarRadius = 16,
- double borderWidth = .25,
- double optionHeight = 35,
- double optionSpacing = 8,
this creates view for users to cast votes
Implementation
const Polls.castVote({
Key? key,
required this.children,
required this.question,
required this.onVote,
this.allowCreatorVote = false,
this.onVoteBorderColor = Colors.blue,
this.backgroundColor = Colors.grey,
this.voteCastedBackgroundColor = Colors.blueGrey,
this.pollStyle,
this.optionBarRadius = 16,
this.borderWidth = .25,
this.optionHeight = 35,
this.optionSpacing = 8,
}) : 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,
voteCastedBorderColor = Colors.transparent,
assert(onVote != null),
super(key: key);