Poll constructor Null safety

Poll(
  1. {required int id,
  2. required String title,
  3. required int createdAt,
  4. required int updatedAt,
  5. required int closeAt,
  6. required PollStatus status,
  7. int? messageId,
  8. PollData? data,
  9. int voterCount = -1,
  10. List<PollOption> options = const [],
  11. String? createdBy,
  12. bool allowUserSuggestion = false,
  13. bool allowMultipleVotes = false,
  14. List<int>? votedPollOptionIds}
)

Implementation

Poll({
  required this.id,
  required this.title,
  required this.createdAt,
  required this.updatedAt,
  required this.closeAt,
  required this.status,
  this.messageId,
  this.data,
  this.voterCount = -1,
  this.options = const [],
  this.createdBy,
  this.allowUserSuggestion = false,
  this.allowMultipleVotes = false,
  this.votedPollOptionIds,
});