QuestionModel constructor

QuestionModel({
  1. required String pollId,
  2. required String questionTitle,
  3. int totalPollCount = 0,
  4. String status = "",
  5. String timeStamp = "",
  6. String confNumber = "",
  7. int duration = 0,
  8. String type = "",
  9. required String pollConst,
})

Implementation

QuestionModel({
  required String pollId,
  required String questionTitle,
  int totalPollCount = 0,
  String status = "",
  String timeStamp = "",
  String confNumber = "",
  int duration = 0,
  String type = "",
  required String pollConst,
})  : _pollId = pollId,
      _questionTitle = questionTitle,
      _totalPollCount = totalPollCount,
      _status = status.obs,  // Initialize with .obs
      _timeStamp = timeStamp,
      _confNumber = confNumber,
      _duration = duration,
      _type = type,
      _pollConst = pollConst;