showSingleChoiceSurvey method
Future<void>
showSingleChoiceSurvey(
{ - required String videoAsset,
- required String userName,
- required String companyTitle,
- String? avatarUrl,
- required String question,
- required List<Choice> choices,
- required OnTapChoice onTapChoice,
- required Function onVideoEndAction,
- Function? onExpand,
- Function? onClose,
- Function? onSkip,
})
Implementation
Future<void> showSingleChoiceSurvey({
required String videoAsset,
required String userName,
required String companyTitle,
String? avatarUrl,
required String question,
required List<Choice> choices,
required OnTapChoice onTapChoice,
required Function onVideoEndAction,
Function? onExpand,
Function? onClose,
Function? onSkip,
}) async {
return showVideoAsset(
videoAsset: videoAsset,
userName: userName,
companyTitle: companyTitle,
avatarUrl: avatarUrl,
onVideoEndAction: onVideoEndAction,
onSkip: onSkip,
onClose: onClose,
onExpand: onExpand,
animateOnVideoEnd: false,
child: SingleChoiceForm(
question: question,
choices: choices,
onTap: (ctx, choice) {
onTapChoice(choice);
Actions.maybeInvoke(ctx, const CloseVideoIntent());
Future.delayed(const Duration(milliseconds: 500), () {
_overlayHelper.popHelper();
});
},
),
);
}