Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MultipleChoiceAutoCompleteAnswerView, other text field in MCQ answers #92

Merged
merged 13 commits into from Nov 14, 2022

Conversation

saiful-apx
Copy link
Contributor

@saiful-apx saiful-apx commented Nov 9, 2022

  • Added MultipleChoiceAutoCompleteAnswerView where developers can pass list of auto complete suggestions, helpful for showing a long list of answers where we can show important choices in the textChoices field and the rest in suggestions.
  • Added otherField = true/false/null for both MultipleChoiceAutoCompleteAnswerView and MultipleChoiceAnswerView, this will enable a TextField to input customized answers which is not in the textChoices list.

Additional small updates:

  • Replaced PlatformAppBar with Flutter default AppBar for consistency.
  • Replaced IconButton for navigating back to Flutter default BackButton widget.

Example Json format:

{
            "stepIdentifier": {
                "id": "13"
            },
            "type": "question",
            "title": "Medicines",
            "answerFormat": {
                "type": "multiple_auto_complete",
                "otherField": true,
                "textChoices": [{
                        "text": "Penicillin",
                        "value": "Penicillin"
                    },
                    {
                        "text": "Latex",
                        "value": "Latex"
                    }

                ],
                "suggestions": [{
                        "text": "Pet",
                        "value": "Pet"
                    },
                    {
                        "text": "Pollen",
                        "value": "Pollen"
                    }
                ]
            }
        },

Demo:

auto_complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants