├── .github
└── workflows
│ └── .github-actions.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_option.yaml
├── assets
├── fancy_checkmark.json
└── gong.mp3
├── devtools_options.yaml
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── example_json.json
│ ├── step_01_android.png
│ ├── step_01_ios.png
│ ├── step_02_android.png
│ ├── step_02_ios.png
│ ├── step_03_android.png
│ ├── step_03_ios.png
│ ├── step_04_android.png
│ ├── step_04_ios.png
│ ├── step_05_android.png
│ ├── step_05_ios.png
│ ├── survey-kit-demo.gif
│ ├── survey-kit-features.png
│ └── surveykit_logo.png
├── devtools_options.yaml
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ └── main.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
├── test
│ └── widget_test.dart
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── i18n
├── de.json
└── en.json
├── lib
├── src
│ ├── answer_format
│ │ ├── agreement_answer_format.dart
│ │ ├── agreement_answer_format.g.dart
│ │ ├── answer_format.dart
│ │ ├── boolean_answer_format.dart
│ │ ├── boolean_answer_format.g.dart
│ │ ├── date_answer_format.dart
│ │ ├── date_answer_format.g.dart
│ │ ├── double_answer_format.dart
│ │ ├── double_answer_format.g.dart
│ │ ├── integer_answer_format.dart
│ │ ├── integer_answer_format.g.dart
│ │ ├── multi_double.dart
│ │ ├── multi_double.g.dart
│ │ ├── multiple_choice_answer_format.dart
│ │ ├── multiple_choice_answer_format.g.dart
│ │ ├── multiple_choice_auto_complete_answer_format.dart
│ │ ├── multiple_choice_auto_complete_answer_format.g.dart
│ │ ├── multiple_double_answer_format.dart
│ │ ├── multiple_double_answer_format.g.dart
│ │ ├── scale_answer_format.dart
│ │ ├── scale_answer_format.g.dart
│ │ ├── single_choice_answer_format.dart
│ │ ├── single_choice_answer_format.g.dart
│ │ ├── text_answer_format.dart
│ │ ├── text_answer_format.g.dart
│ │ ├── text_choice.dart
│ │ ├── text_choice.g.dart
│ │ ├── time_answer_formart.dart
│ │ └── time_answer_formart.g.dart
│ ├── configuration
│ │ └── app_bar_configuration.dart
│ ├── controller
│ │ └── survey_controller.dart
│ ├── navigator
│ │ ├── navigable_task_navigator.dart
│ │ ├── ordered_task_navigator.dart
│ │ ├── rules
│ │ │ ├── conditional_navigation_rule.dart
│ │ │ ├── direct_navigation_rule.dart
│ │ │ ├── direct_navigation_rule.g.dart
│ │ │ ├── navigation_rule.dart
│ │ │ └── rule_not_defined_exception.dart
│ │ └── task_navigator.dart
│ ├── presenter
│ │ ├── survey_event.dart
│ │ ├── survey_presenter.dart
│ │ └── survey_state.dart
│ ├── result
│ │ ├── question
│ │ │ ├── agreement_question_result.dart
│ │ │ ├── agreement_question_result.g.dart
│ │ │ ├── boolean_question_result.dart
│ │ │ ├── boolean_question_result.g.dart
│ │ │ ├── date_question_result.dart
│ │ │ ├── date_question_result.g.dart
│ │ │ ├── double_question_result.dart
│ │ │ ├── double_question_result.g.dart
│ │ │ ├── integer_question_result.dart
│ │ │ ├── integer_question_result.g.dart
│ │ │ ├── multiple_choice_question_result.dart
│ │ │ ├── multiple_choice_question_result.g.dart
│ │ │ ├── multiple_double_question_result.dart
│ │ │ ├── multiple_double_question_result.g.dart
│ │ │ ├── scale_question_result.dart
│ │ │ ├── scale_question_result.g.dart
│ │ │ ├── single_choice_question_result.dart
│ │ │ ├── single_choice_question_result.g.dart
│ │ │ ├── text_question_result.dart
│ │ │ ├── text_question_result.g.dart
│ │ │ ├── time_question_result.dart
│ │ │ └── time_question_result.g.dart
│ │ ├── question_result.dart
│ │ ├── result.dart
│ │ ├── step
│ │ │ ├── completion_step_result.dart
│ │ │ ├── completion_step_result.g.dart
│ │ │ ├── instruction_step_result.dart
│ │ │ ├── instruction_step_result.g.dart
│ │ │ ├── video_step_result.dart
│ │ │ └── video_step_result.g.dart
│ │ ├── step_result.dart
│ │ ├── step_result.g.dart
│ │ └── survey
│ │ │ ├── survey_result.dart
│ │ │ └── survey_result.g.dart
│ ├── steps
│ │ ├── identifier
│ │ │ ├── identifier.dart
│ │ │ ├── identifier.g.dart
│ │ │ ├── step_identifier.dart
│ │ │ └── step_identifier.g.dart
│ │ ├── predefined_steps
│ │ │ ├── answer_format_not_defined_exception.dart
│ │ │ ├── completion_step.dart
│ │ │ ├── completion_step.g.dart
│ │ │ ├── instruction_step.dart
│ │ │ ├── instruction_step.g.dart
│ │ │ ├── question_step.dart
│ │ │ └── question_step.g.dart
│ │ ├── step.dart
│ │ └── step_not_defined_exception.dart
│ ├── survey_kit.dart
│ ├── task
│ │ ├── identifier
│ │ │ ├── task_identifier.dart
│ │ │ └── task_identifier.g.dart
│ │ ├── navigable_task.dart
│ │ ├── ordered_task.dart
│ │ ├── ordered_task.g.dart
│ │ ├── task.dart
│ │ └── task_not_defined_exception.dart
│ ├── views
│ │ ├── agreement_answer_view.dart
│ │ ├── boolean_answer_view.dart
│ │ ├── completion_view.dart
│ │ ├── date_answer_view.dart
│ │ ├── decoration
│ │ │ └── input_decoration.dart
│ │ ├── double_answer_view.dart
│ │ ├── instruction_view.dart
│ │ ├── integer_answer_view.dart
│ │ ├── multiple_auto_complete_answer_view.dart
│ │ ├── multiple_choice_answer_view.dart
│ │ ├── multiple_double_answer_view.dart
│ │ ├── scale_answer_view.dart
│ │ ├── single_choice_answer_view.dart
│ │ ├── text_answer_view.dart
│ │ ├── time_answer_view.dart
│ │ └── widget
│ │ │ ├── selection_list_tile.dart
│ │ │ ├── step_view.dart
│ │ │ ├── survey_app_bar.dart
│ │ │ └── time_picker_widget.dart
│ └── widget
│ │ ├── survey_progress.dart
│ │ └── survey_progress_configuration.dart
└── survey_kit.dart
├── packages
└── survey_kit_image_answer
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── lib
│ ├── src
│ │ ├── answer_format
│ │ │ ├── answer_format.dart
│ │ │ ├── image_answer_format.dart
│ │ │ └── image_answer_format.g.dart
│ │ ├── result
│ │ │ ├── image_question_result.dart
│ │ │ └── image_question_result.g.dart
│ │ └── view
│ │ │ └── image_answer_view.dart
│ └── survey_kit_image_answer.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── test
│ └── image_question_result_test.dart
├── pubspec.lock
├── pubspec.yaml
└── test
├── navigator
├── navigable_task_navigator_test.dart
└── ordered_task_navigator_test.dart
├── src
├── result
│ ├── question
│ │ ├── boolean_question_result_test.dart
│ │ ├── date_question_result_test.dart
│ │ ├── double_question_result_test.dart
│ │ ├── integer_question_result_test.dart
│ │ ├── multiple_choice_question_result_test.dart
│ │ ├── multiple_double_question_result_test.dart
│ │ ├── scale_question_result_test.dart
│ │ ├── single_choice_result_test.dart
│ │ ├── text_question_result_test.dart
│ │ └── time_question_result_test.dart
│ └── step
│ │ ├── completion_step_result_test.dart
│ │ ├── instruction_step_result_test.dart
│ │ └── video_step_result_test.dart
└── survey
│ └── survey_result_test.dart
├── steps
├── identifier
│ └── identifier_test.dart
└── step_test.dart
├── surveykit_flutter_test.dart
├── task
├── navigable_task_test.dart
└── ordered_task_test.dart
└── views
└── date_answer_view_test.dart
/.github/workflows/.github-actions.yml:
--------------------------------------------------------------------------------
1 | name: build
2 | # Trigger the workflow on push or pull request
3 | on:
4 | push:
5 | pull_request:
6 | jobs:
7 | test:
8 | defaults:
9 | run:
10 | working-directory: ./
11 | runs-on: ubuntu-latest
12 | steps:
13 | # The branch or tag ref that triggered the workflow will be checked out.
14 | - uses: actions/checkout@v1
15 | # Setup a flutter environment.
16 | - uses: subosito/flutter-action@v1
17 | with:
18 | channel: "stable"
19 | - run: flutter pub get
20 | - run: flutter analyze
21 | - run: flutter test
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | .fvm/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | .vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 QuickBird Studios
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/assets/gong.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/assets/gong.mp3
--------------------------------------------------------------------------------
/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | description: This file stores settings for Dart & Flutter DevTools.
2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
3 | extensions:
4 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
17 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
18 | - platform: android
19 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
20 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
21 | - platform: ios
22 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
23 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
24 | - platform: linux
25 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
26 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
27 | - platform: macos
28 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
29 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
30 | - platform: web
31 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
32 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
33 | - platform: windows
34 | create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
35 | base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # surveykit_example
2 |
3 | Demonstrates how to use the surveykit plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.9.25'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10 | }
11 | }
12 |
13 | allprojects {
14 | repositories {
15 | google()
16 | mavenCentral()
17 | }
18 | }
19 |
20 | rootProject.buildDir = '../build'
21 | subprojects {
22 | project.buildDir = "${rootProject.buildDir}/${project.name}"
23 | }
24 | subprojects {
25 | project.evaluationDependsOn(':app')
26 | }
27 |
28 | tasks.register("clean", Delete) {
29 | delete rootProject.buildDir
30 | }
31 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
21 | }
22 | }
23 |
24 | plugins {
25 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
26 | id "com.android.application" version "7.3.0" apply false
27 | }
28 |
29 | include ":app"
30 |
--------------------------------------------------------------------------------
/example/assets/step_01_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_01_android.png
--------------------------------------------------------------------------------
/example/assets/step_01_ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_01_ios.png
--------------------------------------------------------------------------------
/example/assets/step_02_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_02_android.png
--------------------------------------------------------------------------------
/example/assets/step_02_ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_02_ios.png
--------------------------------------------------------------------------------
/example/assets/step_03_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_03_android.png
--------------------------------------------------------------------------------
/example/assets/step_03_ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_03_ios.png
--------------------------------------------------------------------------------
/example/assets/step_04_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_04_android.png
--------------------------------------------------------------------------------
/example/assets/step_04_ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_04_ios.png
--------------------------------------------------------------------------------
/example/assets/step_05_android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_05_android.png
--------------------------------------------------------------------------------
/example/assets/step_05_ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/step_05_ios.png
--------------------------------------------------------------------------------
/example/assets/survey-kit-demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/survey-kit-demo.gif
--------------------------------------------------------------------------------
/example/assets/survey-kit-features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/survey-kit-features.png
--------------------------------------------------------------------------------
/example/assets/surveykit_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/assets/surveykit_logo.png
--------------------------------------------------------------------------------
/example/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | extensions:
2 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '12.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - camera_avfoundation (0.0.1):
3 | - Flutter
4 | - Flutter (1.0.0)
5 | - image_picker_ios (0.0.1):
6 | - Flutter
7 | - integration_test (0.0.1):
8 | - Flutter
9 | - url_launcher_ios (0.0.1):
10 | - Flutter
11 | - video_player_avfoundation (0.0.1):
12 | - Flutter
13 | - FlutterMacOS
14 |
15 | DEPENDENCIES:
16 | - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
17 | - Flutter (from `Flutter`)
18 | - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
19 | - integration_test (from `.symlinks/plugins/integration_test/ios`)
20 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
21 | - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
22 |
23 | EXTERNAL SOURCES:
24 | camera_avfoundation:
25 | :path: ".symlinks/plugins/camera_avfoundation/ios"
26 | Flutter:
27 | :path: Flutter
28 | image_picker_ios:
29 | :path: ".symlinks/plugins/image_picker_ios/ios"
30 | integration_test:
31 | :path: ".symlinks/plugins/integration_test/ios"
32 | url_launcher_ios:
33 | :path: ".symlinks/plugins/url_launcher_ios/ios"
34 | video_player_avfoundation:
35 | :path: ".symlinks/plugins/video_player_avfoundation/darwin"
36 |
37 | SPEC CHECKSUMS:
38 | camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
39 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
40 | image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
41 | integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
42 | url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
43 | video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
44 |
45 | PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
46 |
47 | COCOAPODS: 1.16.2
48 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | example
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 |
12 | void fl_register_plugins(FlPluginRegistry* registry) {
13 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
14 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
15 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
16 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
17 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
18 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
19 | }
20 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | file_selector_linux
7 | url_launcher_linux
8 | )
9 |
10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
11 | )
12 |
13 | set(PLUGIN_BUNDLED_LIBRARIES)
14 |
15 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
20 | endforeach(plugin)
21 |
22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
25 | endforeach(ffi_plugin)
26 |
--------------------------------------------------------------------------------
/example/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/example/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import file_selector_macos
9 | import url_launcher_macos
10 | import video_player_avfoundation
11 |
12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
13 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
14 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
15 | FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
16 | }
17 |
--------------------------------------------------------------------------------
/example/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_macos_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/example/macos/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - file_selector_macos (0.0.1):
3 | - FlutterMacOS
4 | - FlutterMacOS (1.0.0)
5 | - url_launcher_macos (0.0.1):
6 | - FlutterMacOS
7 | - video_player_avfoundation (0.0.1):
8 | - Flutter
9 | - FlutterMacOS
10 |
11 | DEPENDENCIES:
12 | - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
13 | - FlutterMacOS (from `Flutter/ephemeral`)
14 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
15 | - video_player_avfoundation (from `Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin`)
16 |
17 | EXTERNAL SOURCES:
18 | file_selector_macos:
19 | :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
20 | FlutterMacOS:
21 | :path: Flutter/ephemeral
22 | url_launcher_macos:
23 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
24 | video_player_avfoundation:
25 | :path: Flutter/ephemeral/.symlinks/plugins/video_player_avfoundation/darwin
26 |
27 | SPEC CHECKSUMS:
28 | file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d
29 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
30 | url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
31 | video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
32 |
33 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
34 |
35 | COCOAPODS: 1.16.2
36 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @main
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import FlutterMacOS
2 | import Cocoa
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | void main() {
11 | test('Empty', () {});
12 | }
13 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | example
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 |
12 | void RegisterPlugins(flutter::PluginRegistry* registry) {
13 | FileSelectorWindowsRegisterWithRegistrar(
14 | registry->GetRegistrarForPlugin("FileSelectorWindows"));
15 | UrlLauncherWindowsRegisterWithRegistrar(
16 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
17 | }
18 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | file_selector_windows
7 | url_launcher_windows
8 | )
9 |
10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
11 | )
12 |
13 | set(PLUGIN_BUNDLED_LIBRARIES)
14 |
15 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
20 | endforeach(plugin)
21 |
22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
25 | endforeach(ffi_plugin)
26 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuickBirdEng/survey_kit/bdc3a94a18588409594b37407e3fa4d8546764ed/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr)
51 | -1; // remove the trailing null character
52 | int input_length = (int)wcslen(utf16_string);
53 | std::string utf8_string;
54 | if (target_length <= 0 || target_length > utf8_string.max_size()) {
55 | return utf8_string;
56 | }
57 | utf8_string.resize(target_length);
58 | int converted_length = ::WideCharToMultiByte(
59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
60 | input_length, utf8_string.data(), target_length, nullptr, nullptr);
61 | if (converted_length == 0) {
62 | return std::string();
63 | }
64 | return utf8_string;
65 | }
66 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/i18n/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Flutter Template App",
3 | "error": "Es ist ein Fehler aufgetreten"
4 | }
--------------------------------------------------------------------------------
/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Flutter template app",
3 | "error": "An error occured"
4 | }
--------------------------------------------------------------------------------
/lib/src/answer_format/agreement_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 | import 'package:survey_kit/src/answer_format/boolean_answer_format.dart';
4 |
5 | part 'agreement_answer_format.g.dart';
6 |
7 | @JsonSerializable()
8 | class AgreementAnswerFormat implements AnswerFormat {
9 | final BooleanResult result;
10 | final BooleanResult? defaultValue;
11 | final String? markdownDescription;
12 | final String? markdownAgreementText;
13 |
14 | const AgreementAnswerFormat({
15 | this.result = BooleanResult.NEGATIVE,
16 | this.defaultValue,
17 | this.markdownDescription,
18 | this.markdownAgreementText,
19 | }) : super();
20 |
21 | factory AgreementAnswerFormat.fromJson(Map json) =>
22 | _$AgreementAnswerFormatFromJson(json);
23 | Map toJson() => _$AgreementAnswerFormatToJson(this);
24 | }
25 |
--------------------------------------------------------------------------------
/lib/src/answer_format/agreement_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'agreement_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | AgreementAnswerFormat _$AgreementAnswerFormatFromJson(
10 | Map json) =>
11 | AgreementAnswerFormat(
12 | result: $enumDecodeNullable(_$BooleanResultEnumMap, json['result']) ??
13 | BooleanResult.NEGATIVE,
14 | defaultValue:
15 | $enumDecodeNullable(_$BooleanResultEnumMap, json['defaultValue']),
16 | markdownDescription: json['markdownDescription'] as String?,
17 | markdownAgreementText: json['markdownAgreementText'] as String?,
18 | );
19 |
20 | Map _$AgreementAnswerFormatToJson(
21 | AgreementAnswerFormat instance) =>
22 | {
23 | 'result': _$BooleanResultEnumMap[instance.result]!,
24 | 'defaultValue': _$BooleanResultEnumMap[instance.defaultValue],
25 | 'markdownDescription': instance.markdownDescription,
26 | 'markdownAgreementText': instance.markdownAgreementText,
27 | };
28 |
29 | const _$BooleanResultEnumMap = {
30 | BooleanResult.NONE: 'NONE',
31 | BooleanResult.POSITIVE: 'POSITIVE',
32 | BooleanResult.NEGATIVE: 'NEGATIVE',
33 | };
34 |
--------------------------------------------------------------------------------
/lib/src/answer_format/boolean_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 |
4 | part 'boolean_answer_format.g.dart';
5 |
6 | @JsonSerializable()
7 | class BooleanAnswerFormat implements AnswerFormat {
8 | final String positiveAnswer;
9 | final String negativeAnswer;
10 | final BooleanResult result;
11 | final BooleanResult? defaultValue;
12 |
13 | const BooleanAnswerFormat({
14 | required this.positiveAnswer,
15 | required this.negativeAnswer,
16 | this.result = BooleanResult.NONE,
17 | this.defaultValue,
18 | }) : super();
19 |
20 | factory BooleanAnswerFormat.fromJson(Map json) =>
21 | _$BooleanAnswerFormatFromJson(json);
22 | Map toJson() => _$BooleanAnswerFormatToJson(this);
23 | }
24 |
25 | enum BooleanResult { NONE, POSITIVE, NEGATIVE }
26 |
--------------------------------------------------------------------------------
/lib/src/answer_format/boolean_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'boolean_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | BooleanAnswerFormat _$BooleanAnswerFormatFromJson(Map json) =>
10 | BooleanAnswerFormat(
11 | positiveAnswer: json['positiveAnswer'] as String,
12 | negativeAnswer: json['negativeAnswer'] as String,
13 | result: $enumDecodeNullable(_$BooleanResultEnumMap, json['result']) ??
14 | BooleanResult.NONE,
15 | defaultValue:
16 | $enumDecodeNullable(_$BooleanResultEnumMap, json['defaultValue']),
17 | );
18 |
19 | Map _$BooleanAnswerFormatToJson(
20 | BooleanAnswerFormat instance) =>
21 | {
22 | 'positiveAnswer': instance.positiveAnswer,
23 | 'negativeAnswer': instance.negativeAnswer,
24 | 'result': _$BooleanResultEnumMap[instance.result]!,
25 | 'defaultValue': _$BooleanResultEnumMap[instance.defaultValue],
26 | };
27 |
28 | const _$BooleanResultEnumMap = {
29 | BooleanResult.NONE: 'NONE',
30 | BooleanResult.POSITIVE: 'POSITIVE',
31 | BooleanResult.NEGATIVE: 'NEGATIVE',
32 | };
33 |
--------------------------------------------------------------------------------
/lib/src/answer_format/date_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 |
4 | part 'date_answer_format.g.dart';
5 |
6 | @JsonSerializable()
7 | class DateAnswerFormat implements AnswerFormat {
8 | /// Default date which will be preselected on datepicker opening
9 | final DateTime? defaultDate;
10 |
11 | /// Lowest date which can be selected via the datepicker
12 | final DateTime? minDate;
13 |
14 | /// Highest date which can be selected via the datepicker
15 | final DateTime? maxDate;
16 |
17 | DateAnswerFormat({
18 | this.defaultDate,
19 | this.minDate,
20 | this.maxDate,
21 | }) : assert(minDate == null || maxDate == null || minDate.isBefore(maxDate)),
22 | assert(defaultDate == null ||
23 | minDate == null ||
24 | defaultDate.isAtSameMomentAs(minDate) ||
25 | defaultDate.isAfter(minDate)),
26 | assert(defaultDate == null ||
27 | maxDate == null ||
28 | defaultDate.isAtSameMomentAs(maxDate) ||
29 | defaultDate.isBefore(maxDate)),
30 | super();
31 |
32 | factory DateAnswerFormat.fromJson(Map json) =>
33 | _$DateAnswerFormatFromJson(json);
34 | Map toJson() => _$DateAnswerFormatToJson(this);
35 | }
36 |
--------------------------------------------------------------------------------
/lib/src/answer_format/date_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'date_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | DateAnswerFormat _$DateAnswerFormatFromJson(Map json) =>
10 | DateAnswerFormat(
11 | defaultDate: json['defaultDate'] == null
12 | ? null
13 | : DateTime.parse(json['defaultDate'] as String),
14 | minDate: json['minDate'] == null
15 | ? null
16 | : DateTime.parse(json['minDate'] as String),
17 | maxDate: json['maxDate'] == null
18 | ? null
19 | : DateTime.parse(json['maxDate'] as String),
20 | );
21 |
22 | Map _$DateAnswerFormatToJson(DateAnswerFormat instance) =>
23 | {
24 | 'defaultDate': instance.defaultDate?.toIso8601String(),
25 | 'minDate': instance.minDate?.toIso8601String(),
26 | 'maxDate': instance.maxDate?.toIso8601String(),
27 | };
28 |
--------------------------------------------------------------------------------
/lib/src/answer_format/double_answer_format.dart:
--------------------------------------------------------------------------------
1 | // by Antonio Bruno, Giacomo Ignesti and Massimo Martinelli
2 |
3 | import 'package:json_annotation/json_annotation.dart';
4 | import 'package:survey_kit/src/answer_format/answer_format.dart';
5 |
6 | part 'double_answer_format.g.dart';
7 |
8 | @JsonSerializable()
9 | class DoubleAnswerFormat implements AnswerFormat {
10 | final double? defaultValue;
11 | final String hint;
12 |
13 | const DoubleAnswerFormat({
14 | this.defaultValue,
15 | this.hint = '',
16 | }) : super();
17 |
18 | factory DoubleAnswerFormat.fromJson(Map json) =>
19 | _$DoubleAnswerFormatFromJson(json);
20 | Map toJson() => _$DoubleAnswerFormatToJson(this);
21 | }
22 |
--------------------------------------------------------------------------------
/lib/src/answer_format/double_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'double_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | DoubleAnswerFormat _$DoubleAnswerFormatFromJson(Map json) =>
10 | DoubleAnswerFormat(
11 | defaultValue: (json['defaultValue'] as num?)?.toDouble(),
12 | hint: json['hint'] as String? ?? '',
13 | );
14 |
15 | Map _$DoubleAnswerFormatToJson(DoubleAnswerFormat instance) =>
16 | {
17 | 'defaultValue': instance.defaultValue,
18 | 'hint': instance.hint,
19 | };
20 |
--------------------------------------------------------------------------------
/lib/src/answer_format/integer_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 |
4 | part 'integer_answer_format.g.dart';
5 |
6 | @JsonSerializable()
7 | class IntegerAnswerFormat implements AnswerFormat {
8 | final int? defaultValue;
9 | final String hint;
10 |
11 | const IntegerAnswerFormat({
12 | this.defaultValue,
13 | this.hint = '',
14 | }) : super();
15 |
16 | factory IntegerAnswerFormat.fromJson(Map json) =>
17 | _$IntegerAnswerFormatFromJson(json);
18 | Map toJson() => _$IntegerAnswerFormatToJson(this);
19 | }
20 |
--------------------------------------------------------------------------------
/lib/src/answer_format/integer_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'integer_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | IntegerAnswerFormat _$IntegerAnswerFormatFromJson(Map json) =>
10 | IntegerAnswerFormat(
11 | defaultValue: (json['defaultValue'] as num?)?.toInt(),
12 | hint: json['hint'] as String? ?? '',
13 | );
14 |
15 | Map _$IntegerAnswerFormatToJson(
16 | IntegerAnswerFormat instance) =>
17 | {
18 | 'defaultValue': instance.defaultValue,
19 | 'hint': instance.hint,
20 | };
21 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multi_double.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'multi_double.g.dart';
4 |
5 | @JsonSerializable()
6 | class MultiDouble {
7 | final String text;
8 | final double value;
9 |
10 | MultiDouble({
11 | required this.text,
12 | required this.value,
13 | }) : super();
14 |
15 | factory MultiDouble.fromJson(Map json) =>
16 | _$MultiDoubleFromJson(json);
17 | Map toJson() => _$MultiDoubleToJson(this);
18 |
19 | bool operator ==(o) => o is MultiDouble && text == o.text && value == o.value;
20 | int get hashCode => text.hashCode ^ value.hashCode;
21 | }
22 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multi_double.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'multi_double.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | MultiDouble _$MultiDoubleFromJson(Map json) => MultiDouble(
10 | text: json['text'] as String,
11 | value: (json['value'] as num).toDouble(),
12 | );
13 |
14 | Map _$MultiDoubleToJson(MultiDouble instance) =>
15 | {
16 | 'text': instance.text,
17 | 'value': instance.value,
18 | };
19 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_choice_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 | import 'package:survey_kit/src/answer_format/text_choice.dart';
4 |
5 | part 'multiple_choice_answer_format.g.dart';
6 |
7 | @JsonSerializable()
8 | class MultipleChoiceAnswerFormat implements AnswerFormat {
9 | final List textChoices;
10 | @JsonKey(defaultValue: const [])
11 | final List defaultSelection;
12 | @JsonKey(defaultValue: false)
13 | final bool otherField;
14 | @JsonKey(defaultValue: 100)
15 | final int maxAnswers;
16 |
17 | const MultipleChoiceAnswerFormat({
18 | required this.textChoices,
19 | this.defaultSelection = const [],
20 | this.otherField = false,
21 | this.maxAnswers = 100
22 | }) : super();
23 |
24 | factory MultipleChoiceAnswerFormat.fromJson(Map json) =>
25 | _$MultipleChoiceAnswerFormatFromJson(json);
26 | Map toJson() => _$MultipleChoiceAnswerFormatToJson(this);
27 | }
28 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_choice_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'multiple_choice_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | MultipleChoiceAnswerFormat _$MultipleChoiceAnswerFormatFromJson(
10 | Map json) =>
11 | MultipleChoiceAnswerFormat(
12 | textChoices: (json['textChoices'] as List)
13 | .map((e) => TextChoice.fromJson(e as Map))
14 | .toList(),
15 | defaultSelection: (json['defaultSelection'] as List?)
16 | ?.map((e) => TextChoice.fromJson(e as Map))
17 | .toList() ??
18 | [],
19 | otherField: json['otherField'] as bool? ?? false,
20 | maxAnswers: (json['maxAnswers'] as num?)?.toInt() ?? 100,
21 | );
22 |
23 | Map _$MultipleChoiceAnswerFormatToJson(
24 | MultipleChoiceAnswerFormat instance) =>
25 | {
26 | 'textChoices': instance.textChoices,
27 | 'defaultSelection': instance.defaultSelection,
28 | 'otherField': instance.otherField,
29 | 'maxAnswers': instance.maxAnswers,
30 | };
31 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_choice_auto_complete_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 | import 'package:survey_kit/src/answer_format/text_choice.dart';
4 |
5 | part 'multiple_choice_auto_complete_answer_format.g.dart';
6 |
7 | @JsonSerializable()
8 | class MultipleChoiceAutoCompleteAnswerFormat implements AnswerFormat {
9 | final List textChoices;
10 | @JsonKey(defaultValue: const [])
11 | final List defaultSelection;
12 | @JsonKey(defaultValue: const [])
13 | final List suggestions;
14 | @JsonKey(defaultValue: false)
15 | final bool otherField;
16 |
17 | const MultipleChoiceAutoCompleteAnswerFormat({
18 | required this.textChoices,
19 | this.defaultSelection = const [],
20 | this.suggestions = const [],
21 | this.otherField = false,
22 | }) : super();
23 |
24 | factory MultipleChoiceAutoCompleteAnswerFormat.fromJson(
25 | Map json) =>
26 | _$MultipleChoiceAutoCompleteAnswerFormatFromJson(json);
27 | Map toJson() =>
28 | _$MultipleChoiceAutoCompleteAnswerFormatToJson(this);
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_choice_auto_complete_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'multiple_choice_auto_complete_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | MultipleChoiceAutoCompleteAnswerFormat
10 | _$MultipleChoiceAutoCompleteAnswerFormatFromJson(
11 | Map json) =>
12 | MultipleChoiceAutoCompleteAnswerFormat(
13 | textChoices: (json['textChoices'] as List)
14 | .map((e) => TextChoice.fromJson(e as Map))
15 | .toList(),
16 | defaultSelection: (json['defaultSelection'] as List?)
17 | ?.map((e) => TextChoice.fromJson(e as Map))
18 | .toList() ??
19 | [],
20 | suggestions: (json['suggestions'] as List?)
21 | ?.map((e) => TextChoice.fromJson(e as Map))
22 | .toList() ??
23 | [],
24 | otherField: json['otherField'] as bool? ?? false,
25 | );
26 |
27 | Map _$MultipleChoiceAutoCompleteAnswerFormatToJson(
28 | MultipleChoiceAutoCompleteAnswerFormat instance) =>
29 | {
30 | 'textChoices': instance.textChoices,
31 | 'defaultSelection': instance.defaultSelection,
32 | 'suggestions': instance.suggestions,
33 | 'otherField': instance.otherField,
34 | };
35 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_double_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 | import 'package:survey_kit/src/answer_format/multi_double.dart';
4 |
5 | part 'multiple_double_answer_format.g.dart';
6 |
7 | @JsonSerializable()
8 | class MultipleDoubleAnswerFormat implements AnswerFormat {
9 | final List? defaultValues;
10 | @JsonKey(defaultValue: const [])
11 | final List hints;
12 |
13 | const MultipleDoubleAnswerFormat({
14 | this.defaultValues,
15 | required this.hints,
16 | }) : super();
17 |
18 | factory MultipleDoubleAnswerFormat.fromJson(Map json) =>
19 | _$MultipleDoubleAnswerFormatFromJson(json);
20 | Map toJson() => _$MultipleDoubleAnswerFormatToJson(this);
21 | }
22 |
--------------------------------------------------------------------------------
/lib/src/answer_format/multiple_double_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'multiple_double_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | MultipleDoubleAnswerFormat _$MultipleDoubleAnswerFormatFromJson(
10 | Map json) =>
11 | MultipleDoubleAnswerFormat(
12 | defaultValues: (json['defaultValues'] as List?)
13 | ?.map((e) => MultiDouble.fromJson(e as Map))
14 | .toList(),
15 | hints:
16 | (json['hints'] as List?)?.map((e) => e as String).toList() ??
17 | [],
18 | );
19 |
20 | Map _$MultipleDoubleAnswerFormatToJson(
21 | MultipleDoubleAnswerFormat instance) =>
22 | {
23 | 'defaultValues': instance.defaultValues,
24 | 'hints': instance.hints,
25 | };
26 |
--------------------------------------------------------------------------------
/lib/src/answer_format/scale_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 |
4 | part 'scale_answer_format.g.dart';
5 |
6 | @JsonSerializable()
7 | class ScaleAnswerFormat implements AnswerFormat {
8 | final double maximumValue;
9 | final double minimumValue;
10 | final double defaultValue;
11 | final double step;
12 | final String maximumValueDescription;
13 | final String minimumValueDescription;
14 | final bool showValue;
15 |
16 | const ScaleAnswerFormat({
17 | required this.maximumValue,
18 | required this.minimumValue,
19 | required this.defaultValue,
20 | required this.step,
21 | this.maximumValueDescription = '',
22 | this.minimumValueDescription = '',
23 | this.showValue = true,
24 | }) : super();
25 |
26 | factory ScaleAnswerFormat.fromJson(Map json) =>
27 | _$ScaleAnswerFormatFromJson(json);
28 | Map toJson() => _$ScaleAnswerFormatToJson(this);
29 | }
30 |
--------------------------------------------------------------------------------
/lib/src/answer_format/scale_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'scale_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | ScaleAnswerFormat _$ScaleAnswerFormatFromJson(Map json) =>
10 | ScaleAnswerFormat(
11 | maximumValue: (json['maximumValue'] as num).toDouble(),
12 | minimumValue: (json['minimumValue'] as num).toDouble(),
13 | defaultValue: (json['defaultValue'] as num).toDouble(),
14 | step: (json['step'] as num).toDouble(),
15 | maximumValueDescription: json['maximumValueDescription'] as String? ?? '',
16 | minimumValueDescription: json['minimumValueDescription'] as String? ?? '',
17 | showValue: json['showValue'] as bool? ?? true,
18 | );
19 |
20 | Map _$ScaleAnswerFormatToJson(ScaleAnswerFormat instance) =>
21 | {
22 | 'maximumValue': instance.maximumValue,
23 | 'minimumValue': instance.minimumValue,
24 | 'defaultValue': instance.defaultValue,
25 | 'step': instance.step,
26 | 'maximumValueDescription': instance.maximumValueDescription,
27 | 'minimumValueDescription': instance.minimumValueDescription,
28 | 'showValue': instance.showValue,
29 | };
30 |
--------------------------------------------------------------------------------
/lib/src/answer_format/single_choice_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 | import 'package:survey_kit/src/answer_format/text_choice.dart';
4 |
5 | part 'single_choice_answer_format.g.dart';
6 |
7 | @JsonSerializable()
8 | class SingleChoiceAnswerFormat implements AnswerFormat {
9 | final List textChoices;
10 | final TextChoice? defaultSelection;
11 |
12 | const SingleChoiceAnswerFormat({
13 | required this.textChoices,
14 | this.defaultSelection,
15 | }) : super();
16 |
17 | factory SingleChoiceAnswerFormat.fromJson(Map json) =>
18 | _$SingleChoiceAnswerFormatFromJson(json);
19 | Map toJson() => _$SingleChoiceAnswerFormatToJson(this);
20 | }
21 |
--------------------------------------------------------------------------------
/lib/src/answer_format/single_choice_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'single_choice_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | SingleChoiceAnswerFormat _$SingleChoiceAnswerFormatFromJson(
10 | Map json) =>
11 | SingleChoiceAnswerFormat(
12 | textChoices: (json['textChoices'] as List)
13 | .map((e) => TextChoice.fromJson(e as Map))
14 | .toList(),
15 | defaultSelection: json['defaultSelection'] == null
16 | ? null
17 | : TextChoice.fromJson(
18 | json['defaultSelection'] as Map),
19 | );
20 |
21 | Map _$SingleChoiceAnswerFormatToJson(
22 | SingleChoiceAnswerFormat instance) =>
23 | {
24 | 'textChoices': instance.textChoices,
25 | 'defaultSelection': instance.defaultSelection,
26 | };
27 |
--------------------------------------------------------------------------------
/lib/src/answer_format/text_answer_format.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:survey_kit/src/answer_format/answer_format.dart';
3 |
4 | part 'text_answer_format.g.dart';
5 |
6 | @JsonSerializable()
7 | class TextAnswerFormat implements AnswerFormat {
8 | final int? maxLines;
9 | final String? defaultValue;
10 | @JsonKey(defaultValue: '')
11 | final String hint;
12 |
13 | /// Regular expression by which the text gets validated
14 | /// default: '^(?!\s*$).+' that checks if the entered text is empty
15 | /// to allow any type of an answer including an empty one;
16 | /// set it explicitly to null.
17 | ///
18 | @JsonKey(defaultValue: '^(?!\s*\$).+')
19 | final String? validationRegEx;
20 |
21 | const TextAnswerFormat({
22 | this.maxLines,
23 | this.hint = '',
24 | this.defaultValue,
25 | this.validationRegEx = '^(?!\s*\$).+',
26 | }) : super();
27 |
28 | factory TextAnswerFormat.fromJson(Map json) =>
29 | _$TextAnswerFormatFromJson(json);
30 | Map toJson() => _$TextAnswerFormatToJson(this);
31 | }
32 |
--------------------------------------------------------------------------------
/lib/src/answer_format/text_answer_format.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'text_answer_format.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | TextAnswerFormat _$TextAnswerFormatFromJson(Map json) =>
10 | TextAnswerFormat(
11 | maxLines: (json['maxLines'] as num?)?.toInt(),
12 | hint: json['hint'] as String? ?? '',
13 | defaultValue: json['defaultValue'] as String?,
14 | validationRegEx: json['validationRegEx'] as String? ?? r'^(?!s*$).+',
15 | );
16 |
17 | Map _$TextAnswerFormatToJson(TextAnswerFormat instance) =>
18 | {
19 | 'maxLines': instance.maxLines,
20 | 'defaultValue': instance.defaultValue,
21 | 'hint': instance.hint,
22 | 'validationRegEx': instance.validationRegEx,
23 | };
24 |
--------------------------------------------------------------------------------
/lib/src/answer_format/text_choice.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'text_choice.g.dart';
4 |
5 | @JsonSerializable()
6 | class TextChoice {
7 | final String text;
8 | final String value;
9 |
10 | const TextChoice({
11 | required this.text,
12 | required this.value,
13 | }) : super();
14 |
15 | factory TextChoice.fromJson(Map json) =>
16 | _$TextChoiceFromJson(json);
17 | Map toJson() => _$TextChoiceToJson(this);
18 |
19 | bool operator ==(o) => o is TextChoice && text == o.text && value == o.value;
20 | int get hashCode => text.hashCode ^ value.hashCode;
21 | }
22 |
--------------------------------------------------------------------------------
/lib/src/answer_format/text_choice.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'text_choice.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | TextChoice _$TextChoiceFromJson(Map json) => TextChoice(
10 | text: json['text'] as String,
11 | value: json['value'] as String,
12 | );
13 |
14 | Map _$TextChoiceToJson(TextChoice instance) =>
15 | {
16 | 'text': instance.text,
17 | 'value': instance.value,
18 | };
19 |
--------------------------------------------------------------------------------
/lib/src/answer_format/time_answer_formart.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:json_annotation/json_annotation.dart';
3 | import 'package:survey_kit/src/answer_format/answer_format.dart';
4 |
5 | part 'time_answer_formart.g.dart';
6 |
7 | @JsonSerializable()
8 | class TimeAnswerFormat implements AnswerFormat {
9 | @_TimeOfDayJsonConverter()
10 | final TimeOfDay? defaultValue;
11 |
12 | const TimeAnswerFormat({
13 | this.defaultValue,
14 | }) : super();
15 |
16 | factory TimeAnswerFormat.fromJson(Map json) =>
17 | _$TimeAnswerFormatFromJson(json);
18 | Map toJson() => _$TimeAnswerFormatToJson(this);
19 | }
20 |
21 | class _TimeOfDayJsonConverter
22 | implements JsonConverter> {
23 | const _TimeOfDayJsonConverter();
24 |
25 | @override
26 | TimeOfDay? fromJson(Map json) {
27 | if (json['hour'] == null || json['minute'] == null) {
28 | return null;
29 | }
30 | return TimeOfDay(
31 | hour: json['hour'] as int,
32 | minute: json['minute'] as int,
33 | );
34 | }
35 |
36 | @override
37 | Map toJson(TimeOfDay? timeOfDay) => {
38 | 'hour': timeOfDay?.hour,
39 | 'minute': timeOfDay?.minute,
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/lib/src/answer_format/time_answer_formart.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'time_answer_formart.dart';
4 |
5 | // **************************************************************************
6 | // JsonSerializableGenerator
7 | // **************************************************************************
8 |
9 | TimeAnswerFormat _$TimeAnswerFormatFromJson(Map json) =>
10 | TimeAnswerFormat(
11 | defaultValue: _$JsonConverterFromJson