Skip to content

Commit

Permalink
fix: make free text field optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimozkn committed Jul 7, 2024
1 parent e5ae24a commit 0c3bd72
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class _FreeTextQuestionWidgetState extends State<FreeTextQuestionWidget> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
if (widget.question.lengthRange[0] == 0) {
widget.onDone!(widget.question.constructAnswer(""));
}
});
}

@override
Expand Down

0 comments on commit 0c3bd72

Please sign in to comment.