SurveyStep<T>.rating constructor

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

Constructor for creating a rating survey step.

Parameters:

  • id: The unique identifier for the step.
  • title: The display title for the step.
  • description: An optional description for the step.
  • isRequired: A boolean indicating if the step is required.

Implementation

SurveyStep.rating({
  required this.id,
  required this.title,
  this.description,
  this.answer,
  this.isRequired = true,
  this.beforeComplete,
  this.onCompleted,
  this.onInit,
  this.customWidget,
})  : options = null,
      stepType = SurveyStepType.rating;