SurveyStep<T>.multipleChoiceMultiSelect constructor

SurveyStep<T>.multipleChoiceMultiSelect({
  1. required String id,
  2. required String title,
  3. String? description,
  4. required List<SurveyOption> options,
  5. T? answer,
  6. bool isRequired = true,
  7. Future<void> beforeComplete(
    1. dynamic answer
    )?,
  8. void onCompleted(
    1. dynamic answer
    )?,
  9. Future<void> onInit(
    1. SurveyStep<T>? step
    )?,
  10. Widget customWidget(
    1. BuildContext context,
    2. SurveyStep<T> step
    )?,
})

Constructor for creating a multiple choice multi select survey step.

Parameters:

  • id: The unique identifier for the step.
  • title: The display title for the step.
  • description: An optional description for the step.
  • options: A list of SurveyOption objects representing the choices.
  • isRequired: A boolean indicating if the step is required.

Implementation

SurveyStep.multipleChoiceMultiSelect({
  required this.id,
  required this.title,
  this.description,
  required List<SurveyOption> this.options,
  this.answer,
  this.isRequired = true,
  this.beforeComplete,
  this.onCompleted,
  this.onInit,
  this.customWidget,
})  : stepType = SurveyStepType.multipleChoiceMultiSelect,
      assert(options.length >= 2,
          'Multiple choice questions must have at least two options.');