closeSurvey method

void closeSurvey(
  1. BuildContext context, {
  2. QuestionResult resultFunction()?,
})

Implementation

void closeSurvey(
  BuildContext context, {
  QuestionResult Function()? resultFunction,
}) {
  if (onCloseSurvey != null) {
    if (!onCloseSurvey!(context, resultFunction)) return;
  }
  BlocProvider.of<SurveyPresenter>(context).add(
    CloseSurvey(
      resultFunction != null ? resultFunction.call() : null,
    ),
  );
}