Polls constructor
const
Polls({
- Key? key,
- required List children,
- required Text question,
- required Map? voteData,
- required String? currentUser,
- required String? creatorID,
- int? userChoice,
- bool allowCreatorVote = false,
- PollCallBack? onVote,
- Color outlineColor = Colors.blue,
- Color backgroundColor = Colors.blueGrey,
- Color? onVoteBackgroundColor = Colors.blue,
- TextStyle? leadingPollStyle,
- TextStyle pollStyle = const TextStyle(),
- Color? iconColor = Colors.black,
- Color? leadingBackgroundColor = Colors.blueGrey,
Polls contruct by default get view for voting
Implementation
const Polls({super.key,
required this.children,
required this.question,
required this.voteData,
required this.currentUser,
required this.creatorID,
this.userChoice,
this.allowCreatorVote = false,
this.onVote,
this.outlineColor = Colors.blue,
this.backgroundColor = Colors.blueGrey,
this.onVoteBackgroundColor = Colors.blue,
this.leadingPollStyle,
this.pollStyle = const TextStyle(),
this.iconColor = Colors.black,
this.leadingBackgroundColor = Colors.blueGrey,
}) : highest = null,
getHighest = null,
getTotal = null,
viewType = null,
assert(onVote != null),
assert(question != null),
assert(children != null),
assert(voteData != null),
assert(currentUser != null),
assert(creatorID != null);