Polls constructor

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

Polls contruct by default get view for voting

Implementation

Polls({
  required this.children,
  required this.voteData,
  required this.currentUser,
  required this.creatorID,
  this.pollVoteData,
  this.question,
  this.userChoice,
  this.allowCreatorVote = false,
  this.onVote,
  this.outlineColor = Colors.blue,
  this.backgroundColor = Colors.white,
  this.onVoteBackgroundColor = Colors.white,
  this.onVotePollStyle,
  this.leadingPollStyle,
  this.pollStyle,
  this.iconColor = Colors.black,
  this.lowestBackgroundColor = Colors.blueGrey,
  this.lowestPollStyle,
})  : lowest = null,
      getlowest = null,
      getTotal = null,
      viewType = null,
      assert(onVote != null),
      assert(children != null),
      assert(voteData != null),
      assert(currentUser != null),
      assert(creatorID != null);