Skip to content

Commit

Permalink
Added/Fixed default values for TextAnswerView and BooleanAnswerView (#93
Browse files Browse the repository at this point in the history
)

* added missing MultipleChoiceQuestionResult toJson

* Updated PlatformAppbar with default AppBar widget

* Updated IconButton -> BackButton

* Added other field in Multiple choice answers

* added Multiple choice autocomplete

* Customized the builder

* added comment

* DRY refactor

* Updated other field label behavior

* Added clear button and added tick mark check on dropdown

* Updated example

* Removed comment

* json file updated

* added default value for text question

* Boolean Answer defaultValue

* put back actual example_json.json

* update build_runner dependency

* update flutter changes for android directory

* update flutter changes for ios directory

* update example pubspec.lock

* add missing JsonSerializable annotation for ImageQuestionResult

* re-run build_runner latest verson

* remove duplicate imports

---------

Co-authored-by: Adar <[email protected]>
Co-authored-by: saiful_apx <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 559c31d commit cd75004
Show file tree
Hide file tree
Showing 23 changed files with 580 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.flutter.plugins.camera.CameraPlugin;
import io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin;
import io.flutter.plugins.imagepicker.ImagePickerPlugin;
import dev.flutter.plugins.integration_test.IntegrationTestPlugin;
import io.flutter.plugins.videoplayer.VideoPlayerPlugin;

/**
Expand All @@ -17,6 +18,7 @@ public static void registerWith(PluginRegistry registry) {
CameraPlugin.registerWith(registry.registrarFor("io.flutter.plugins.camera.CameraPlugin"));
FlutterAndroidLifecyclePlugin.registerWith(registry.registrarFor("io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin"));
ImagePickerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.imagepicker.ImagePickerPlugin"));
IntegrationTestPlugin.registerWith(registry.registrarFor("dev.flutter.plugins.integration_test.IntegrationTestPlugin"));
VideoPlayerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.videoplayer.VideoPlayerPlugin"));
}

Expand Down
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sdk.dir=/Users/marvin/Library/Android/sdk
flutter.sdk=/Users/marvin/fvm/versions/3.3.10
sdk.dir=/Users/saifulislam/Library/Android/sdk
flutter.sdk=/Users/saifulislam/Development/flutter_sdk/flutter
15 changes: 5 additions & 10 deletions example/assets/example_json.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"id": "123",
"type": "navigable",
"rules": [
{
"rules": [{
"type": "conditional",
"triggerStepIdentifier": {
"id": "7"
Expand Down Expand Up @@ -53,8 +52,7 @@
}
}
],
"steps": [
{
"steps": [{
"stepIdentifier": {
"id": "1"
},
Expand Down Expand Up @@ -126,8 +124,7 @@
"title": "Known allergies",
"answerFormat": {
"type": "multiple",
"textChoices": [
{
"textChoices": [{
"text": "Penicillin",
"value": "Penicillin"
},
Expand Down Expand Up @@ -155,8 +152,7 @@
"text": "We are done, do you mind to tell us more about yourself?",
"answerFormat": {
"type": "single",
"textChoices": [
{
"textChoices": [{
"text": "Yes",
"value": "Yes"
},
Expand Down Expand Up @@ -272,8 +268,7 @@
"text": "What type of pet(s) do you have?",
"answerFormat": {
"type": "multiple",
"textChoices": [
{
"textChoices": [{
"text": "Dog",
"value": "Dog"
},
Expand Down
Loading

0 comments on commit cd75004

Please sign in to comment.