Polls constructor

Polls({
  1. required List children,
  2. required Text question,
  3. required Map? voteData,
  4. required String? currentUser,
  5. required String? creatorID,
  6. int? userChoice,
  7. bool allowCreatorVote = false,
  8. PollCallBack? onVote,
  9. Color outlineColor = Colors.blue,
  10. Color backgroundColor = Colors.blueGrey,
  11. Color? onVoteBackgroundColor = Colors.blue,
  12. TextStyle? leadingPollStyle,
  13. TextStyle? pollStyle,
  14. Color? iconColor = Colors.black,
  15. Color? leadingBackgroundColor = Colors.blueGrey,
})

Polls contruct by default get view for voting

Implementation

Polls({
  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,
  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);