SurveyStep<T> constructor
SurveyStep<T> ({
- required String id,
- required String title,
- String? description,
- required SurveyStepType stepType,
- List<
SurveyOption> ? options, - T? answer,
- bool isRequired = true,
- Future<
void> beforeComplete(- dynamic answer
- void onCompleted(
- dynamic answer
- Future<
void> onInit(- SurveyStep<
T> ? step
- SurveyStep<
- Widget customWidget(
- BuildContext context,
- SurveyStep<
T> step
Implementation
SurveyStep({
required this.id,
required this.title,
this.description,
required this.stepType,
this.options,
this.answer,
this.isRequired = true,
this.beforeComplete,
this.onCompleted,
this.onInit,
this.customWidget,
}) : assert(
stepType != SurveyStepType.multipleChoiceSingleSelect ||
(options != null && options.length >= 2),
'Multiple choice questions must have at least two options.',
);