QuestionStep function

  1. @Deprecated('Create Step from Step.dart')
Step QuestionStep({
  1. String? id,
  2. required String title,
  3. String text = '',
  4. required AnswerFormat answerFormat,
  5. bool isOptional = true,
  6. String? buttonText,
})

It is uppercase to support previous implementions of the QuestionStep

Implementation

@Deprecated('Create Step from Step.dart')
// ignore: non_constant_identifier_names
Step QuestionStep({
  String? id,
  required String title,
  String text = '',
  required AnswerFormat answerFormat,
  bool isOptional = true,
  String? buttonText,
}) =>
    Step(
      id: id,
      content: [
        TextContent(
          text: title,
          fontSize: 22,
        ),
        TextContent(
          text: text,
        ),
      ],
      answerFormat: answerFormat,
      isMandatory: !isOptional,
      buttonText: buttonText,
    );