stepBody method

Widget stepBody(
  1. RPAnswerFormat answerFormat
)

Implementation

Widget stepBody(RPAnswerFormat answerFormat) {
  switch (answerFormat.runtimeType) {
    case const (RPIntegerAnswerFormat):
      return RPUIIntegerQuestionBody((answerFormat as RPIntegerAnswerFormat),
          (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPDoubleAnswerFormat):
      return RPUIDoubleQuestionBody((answerFormat as RPDoubleAnswerFormat),
          (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPChoiceAnswerFormat):
      return RPUIChoiceQuestionBody((answerFormat as RPChoiceAnswerFormat),
          (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPSliderAnswerFormat):
      return RPUISliderQuestionBody((answerFormat as RPSliderAnswerFormat),
          (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPImageChoiceAnswerFormat):
      return RPUIImageChoiceQuestionBody(
          (answerFormat as RPImageChoiceAnswerFormat), (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPDateTimeAnswerFormat):
      return RPUIDateTimeQuestionBody(
          (answerFormat as RPDateTimeAnswerFormat), (result) {
        currentQuestionBodyResult = result;
      });
    case const (RPTextAnswerFormat):
      return RPUITextInputQuestionBody((answerFormat as RPTextAnswerFormat),
          (result) {
        currentQuestionBodyResult = result;
      });
    default:
      return Container();
  }
}