PollCreateParams constructor Null safety

PollCreateParams(
  1. {required String title,
  2. required List<String> options,
  3. PollData? data,
  4. bool? allowUserSuggestion,
  5. bool? allowMutipleVotes,
  6. int closeAt = -1}
)

Implementation

PollCreateParams({
  required this.title,
  required this.options,
  this.data,
  this.allowUserSuggestion,
  this.allowMutipleVotes,
  this.closeAt = -1, // Default value
})  : assert(options.isNotEmpty && options.length <= 20),
      assert(title.length <= 2000);