{"id":28941305,"url":"https://github.com/quickbirdeng/survey_kit","last_synced_at":"2026-04-01T19:38:44.942Z","repository":{"id":37979191,"uuid":"339670975","full_name":"QuickBirdEng/survey_kit","owner":"QuickBirdEng","description":"Flutter library to create beautiful surveys (aligned with ResearchKit on iOS)","archived":false,"fork":false,"pushed_at":"2025-05-27T13:45:57.000Z","size":2658,"stargazers_count":130,"open_issues_count":32,"forks_count":102,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-23T02:09:55.690Z","etag":null,"topics":["clinical-trials","dart","data","flutter","flutter-library","flutter-package","flutter-plugin","flutter-ui","flutter-widget","forms","ios-researchkit-surveys","medical","poll","research","study-conduct","survey"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuickBirdEng.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-17T09:27:59.000Z","updated_at":"2025-05-02T12:24:19.000Z","dependencies_parsed_at":"2022-07-16T01:16:12.848Z","dependency_job_id":"987efd7a-9248-4347-ad89-7cb559826ee9","html_url":"https://github.com/QuickBirdEng/survey_kit","commit_stats":{"total_commits":93,"total_committers":20,"mean_commits":4.65,"dds":0.5483870967741935,"last_synced_commit":"0d5e4af611b743bc225064199a705053e26ff228"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/QuickBirdEng/survey_kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuickBirdEng%2Fsurvey_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuickBirdEng%2Fsurvey_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuickBirdEng%2Fsurvey_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuickBirdEng%2Fsurvey_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuickBirdEng","download_url":"https://codeload.github.com/QuickBirdEng/survey_kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuickBirdEng%2Fsurvey_kit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261397490,"owners_count":23152492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clinical-trials","dart","data","flutter","flutter-library","flutter-package","flutter-plugin","flutter-ui","flutter-widget","forms","ios-researchkit-surveys","medical","poll","research","study-conduct","survey"],"created_at":"2025-06-23T02:09:56.493Z","updated_at":"2026-01-11T04:42:27.341Z","avatar_url":"https://github.com/QuickBirdEng.png","language":"Dart","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/surveykit_logo.png?raw=true\" width=\"500\"\u003e\n\u003c/p\u003e\n\n# SurveyKit: Create beautiful surveys with Flutter (inspired by [iOS ResearchKit Surveys](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html))\n\nDo you want to display a questionnaire to get the opinion of your users? A survey for a medical trial? A series of instructions in a manual-like style?   \nSurveyKit is an Flutter library that allows you to create exactly that.\n\nThematically it is built to provide a feeling of a professional research survey. The library aims to be visually clean, lean and easily configurable.\nWe aim to keep the functionality close to [iOS ResearchKit Surveys](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html). We also created a SurveyKit version for native Android developers, [check it out here](https://github.com/quickbirdstudios/SurveyKit)\n\nThis is an early version and work in progress. Do not hesitate to give feedback, ideas or improvements via an issue.\n\n# Examples\n###### Flow\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/survey-kit-demo.gif?raw=true\" width=\"350\"\u003e\n\u003c/p\u003e\n\n###### Screenshots\n\n| | | | | | \n| :---: | :---: | :---: | :---: | :---: |\n| \u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/step_01_ios.png?raw=true\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/step_02_ios.png?raw=true\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/step_03_ios.png?raw=true\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/step_04_ios.png?raw=true\" width=\"200\"\u003e | \u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/step_05_ios.png?raw=true\" width=\"200\"\u003e |\n\n## 📚 Overview: Creating Research Surveys\n- [What SurveyKit does for you](#what-surveykit-does-for-you)\n- [What SurveyKit does not (yet) do for you](#what-surveykit-does-not-yet-do-for-you)\n- [🏃 Setup](#-🏃-setup)\n  - [1. Add the dependecy](#1-add-the-dependecy)\n  - [2. Install it](#2-install-it)\n  - [3. Import it](#3-import-it)\n- [💻 Usage](#-usage)\n  - [Create survey steps](#create-survey-steps)\n  - [Create a Task](#create-a-task)\n  - [Evaluate the results](#evaluate-the-results)\n  - [Style](#style)\n  - [Start the survey](#start-the-survey)\n- [📇 Custom steps](#-custom-steps)\n- [🍏vs🤖 : Comparison of Flutter SurveyKit, SurveyKit on Android to ResearchKit on iOS](#-🍏vs🤖-:-comparison-of-flutter-surveykit,-surveykit-on-android-to-researchkit-on-iOS)\n- [👤 Author](#-author)\n- [❤️ Contributing](#️-contributing)\n- [📃 License](#-license)\n\n## What SurveyKit does for you\n-   Simplifies the creation of surveys\n-   Provides rich animations and transitions out of the box (custom animations planned)\n-   Build with a consistent, lean, simple style, to fit research purposes\n-   Survey navigation can be linear or based on a decision tree (directed graph)\n-   Gathers results and provides them in a convinient manner to the developer for further use\n-   Gives you complete freedom on creating your own questions\n-   Allows you to customize the style\n-   Provides an API and structure that is very similar to [iOS ResearchKit Surveys](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html)\n\n## What SurveyKit does not (yet) do for you\nAs stated before, this is an early version and a work in progress. We aim to extend this library until it matches the functionality of the [iOS ResearchKit Surveys](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html).\n\n# 🏃 Setup  \nTo use this plugin, add flutter_surveykit as a dependency in your pubspec.yaml file.\n\n## 1. Add the dependecy\n`pubspec.yaml`\n```yaml\ndependencies:\n  survey_kit: ^0.1.1\n```\n\n## 2. Install it\n```\nflutter pub get\n```\n\n## 3. Import it\n```dart\nimport 'package:survey_kit/survey_kit.dart';\n```\n\n# 💻 Usage\n## Example\nA working example project can be found [HERE](example/)\n\n### Create survey steps\nTo create a step, create an instance of one of these 3 classes:\n#### `InstructionStep`\n```dart\nInstructionStep(\n    title: 'Your journey starts here',\n    text: 'Have fun with a quick survey',\n    buttonText: 'Start survey',\n);\n```\nThe `title` is the general title of the Survey you want to conduct.   \nThe `text` is, in this case, the introduction text which should give an introduction, about what the survey is about.  \nThe `buttonText` specifies the text of the button, which will start the survey.\nAll of these properties have to be resource Ids.\n\n#### `CompletionStep`\n```dart\nCompletionStep(\n    title: 'You are done',\n    text: 'You have finished !!!',\n    buttonText: 'Submit survey',\n);\n```\nThe `title` is the general title of the Survey you want to conduct, same as for the `InstructionStep`.   \nThe `text` is here should be something motivational: that the survey has been completed successfully.   \nThe `buttonText` specifies the text of the button, which will end the survey.\nAll of these properties have to be resource Ids.\n\n#### `QuestionStep`\n```dart\nQuestionStep(\n    title: 'Sample title',\n    text: 'Sample text',\n    answerFormat: TextAnswerFormat(\n        maxLines: 5,\n    ),\n);\n```\nThe `title` same as for the `InstructionStep` and `CompletionStep`.   \nThe `text` the actual question you want to ask. Depending on the answer type of this, you should set the next property.  \nThe `answerFormat` specifies the type of question (the type of answer to the question) you want to ask. Currently there these types supported:\n-   `TextAnswerFormat`\n-   `IntegerAnswerFormat`\n-   `ScaleAnswerFormat`\n-   `SingleChoiceAnswerFormat`\n-   `MultipleChoiceAnswerFormat`\n-   `BooleanAnswerFormat`\n\nAll that's left is to collect your steps in a list or add them inline in the widget.\n```dart\nvar steps = [step1, step2, step3, ...]\n```\n\n### Create a Task\nNext you need a task. Each survey has **exactly one** task. A `Task` is used to define how the user should navigate through your `steps`. \u003cbr\u003e\u003cbr\u003e\n\n#### OrderedTask\n```dart\nvar task = OrderedTask(steps: steps)\n```\nThe `OrderedTask` just presents the questions in order, as they are given.\n\n#### NavigableOrderedTask\n````dart\nvar task = NavigableOrderedTask(steps: steps)\n````\nThe `NavigableOrderedTask` allows you to specify navigation rules.\u003cbr\u003e\nThere are two types of navigation rules:\n  \nWith the `DirectStepNavigationRule` you say that after this step, another specified step should follow.\n```dart\ntask.addNavigationRule(\n  forTriggerStepIdentifier: steps[4].id,\n  navigationRule: DirectStepNavigationRule(\n      destinationStepStepIdentifier: steps[6].id\n  ),\n);\n```\n  \nWith the `MultipleDirectionStepNavigationRule` you can specify the next step, depending on the answer of the step.\n```dart\ntask.addNavigationRule(\n  forTriggerStepIdentifier: task.steps[6].id,\n  navigationRule: ConditionalNavigationRule(\n    resultToStepIdentifierMapper: (input) {\n      switch (input) {\n        case \"Yes\":\n          return task.steps[0].id;\n        case \"No\":\n          return task.steps[7].id;\n        default:\n          return null;\n      }\n    },\n  ),\n);\n\n```\n\n### Evaluate the results\nWhen the survey is finished, you get a callback. No matter of the `FinishReason`, you always get all results gathered until now.   \nThe `SurveyResult` contains a list of `StepResult`s and the `FinishReason`. The `StepResult` contains a list of `QuestionResult`s.\n```dart\n SurveyKit(\n    onResult: (SurveyResult result) {\n      //Read finish reason from result (result.finishReason)\n      //and evaluate the results\n    },\n)\n```\n### Export the results to JSON\nAfter obtaining the `SurveyResult` object in the callback described above, you can use its `toJson()` method to either print the results in a json format, or to pass that json (Map) object on, and for example store it (in your DB, SharedPreferences, as a separate file etc.)\n```dart\n SurveyKit(\n    onResult: (SurveyResult result) {\n      final jsonResult = result.toJson();\n      // print the json-formatted results\n      debugPrint(jsonEncode(jsonResult));\n      // or store them\n      yourDbHandler.store(jsonResult);\n    },\n)\n```\n\n### Style\nThere are already many adaptive elements for Android and IOS implemented. In the future development other parts will be adapted too.\nThe styling can be adjusted by the build in Flutter theme.\n\n| textTheme   |  Used in                    |\n|-------------|-----------------------------|\n| headline2   | Title of question           |\n| headline5   | Text of question            |\n| bodyText2   | Text of ListTiles           |\n| subtitle1   | Textstyle used in TextFields|\n\n### Localization\nIf you want to override the fixed texts or adapt them to different languages like close, next, .... You need to provide SurveyKit a Map of translations\n\n```dart\nSurveyKit(\n    localizations: {\n        'cancel': 'Cancel',\n    }\n);\n```\nHere is a complete list of keys that can be overriden:\n\n| key   |  value |\n|-------|--------|\n| cancel| cancel |\n| next  | next   |\n|       |        |\n\n\n### Start the survey\nAll that's left is to insert the survey in the widget tree and enjoy.🎉🎊\n```dart\nScaffold(\n    body: SurveyKit(\n         onResult: (SurveyResult result) {\n            //Evaluate results\n          },\n          task: OrderedTask(),\n          theme: CustomThemeData(),\n    )\n);\n```\n\n\n# 📇 Custom steps\nAt some point, you might wanna define your own custom question steps. \nThat could, for example, be a question which prompts the user to pick color values or even sound samples. \nThese are not implemented yet but you can easily create them yourself: \n\nYou'll need a `CustomResult` and a `CustomStep`. The Result class tells SurveyKit which data you want to save. \n```dart\nclass CustomResult extends QuestionResult\u003cString\u003e {\n    final String customData;\n    final String valueIdentifier;\n    final Identifier identifier;\n    final DateTime startDate;\n    final DateTime endDate;\n    final String value; //Custom value\n}\n```\nNext you'll need a CustomStep class. It is recommended to use the `StepView` widget as your foundation. It gives you the AppBar and the next button. \n```dart\nclass CustomStep extends Step {\n  final String title;\n  final String text;\n\n  CustomStep({\n    @required StepIdentifier id,\n    bool isOptional = false,\n    String buttonText = 'Next',\n    this.title,\n    this.text,\n  }) : super(isOptional, id, buttonText);\n\n  @override\n  Widget createView({@required QuestionResult questionResult}) {\n      return StepView(\n            step: widget.questionStep,\n            result: () =\u003e CustomResult(\n                id: id,\n                startDate: DateTime.now(),\n                endDate: DateTime.now(),\n                valueIdentifier: 'custom'//Identification for NavigableTask,\n                result: 'custom_result',\n            ),\n            title: Text('Title'),\n            child: Container(), //Add your view here\n        );\n  }\n}\n```\n\n\nIf you want to create a complete custom view or just override the navigation behavior you should use the SurveyController with its three methods:\n* onNextStep()\n* onStepBack()\n* onCloseSurvey()\n\n# 🍏vs🤖 : Comparison of Flutter SurveyKit, [SurveyKit on Android](https://github.com/quickbirdstudios/SurveyKit) to [ResearchKit on iOS](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html)\nThis is an overview of which features [iOS ResearchKit Surveys](https://researchkit.org/docs/docs/Survey/CreatingSurveys.html) provides and which ones are already supported by [SurveyKit on Android](https://github.com/quickbirdstudios/SurveyKit).\nThe goal is to make all three libraries match in terms of their functionality.\n\n\u003cp\u003e \n\u003cimg src=\"https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/survey-kit-features.png?raw=true\"\u003e\n\u003c/p\u003e\n\n\n# 🤖 : Create your Survey via JSON\nYou are also able to load and create your survey via JSON. This gives you the oppertunity to dynamicly configure and deliver different surveys.\nTo create your survey in JSON is almost as easy as in Dart.\nJust call ```dart Task.fromJson() ``` with your JSON-File or Response. The JSON should look like this:\n\n```json\n{\n    \"id\": \"123\",\n    \"type\": \"navigable\",\n    \"rules\": [\n        {\n            \"type\": \"conditional\",\n            \"triggerStepIdentifier\": {\n                \"id\": \"3\"\n            },\n            \"values\": {\n                \"Yes\": \"2\",\n                \"No\": \"10\"\n            }\n        },\n        {\n            \"type\": \"direct\",\n            \"triggerStepIdentifier\": {\n                \"id\": \"1\"\n            },\n            \"destinationStepIdentifier\": {\n                \"id\": \"3\"\n            }\n        },\n        {\n            \"type\": \"direct\",\n            \"triggerStepIdentifier\": {\n                \"id\": \"2\"\n            },\n            \"destinationStepIdentifier\": {\n                \"id\": \"10\"\n            }\n        }\n    ],\n    \"steps\": [\n        {\n            \"stepIdentifier\": {\n                \"id\": \"1\"\n            },\n            \"type\": \"intro\",\n            \"title\": \"Welcome to the\\nQuickBird Studios\\nHealth Survey\",\n            \"text\": \"Get ready for a bunch of super random questions!\",\n            \"buttonText\": \"Let's go!\"\n        },\n        {\n            \"stepIdentifier\": {\n                \"id\": \"2\"\n            },\n            \"type\": \"question\",\n            \"title\": \"How old are you?\",\n            \"answerFormat\": {\n                \"type\": \"integer\",\n                \"defaultValue\": 25,\n                \"hint\": \"Please enter your age\"\n            }\n        },\n        {\n            \"stepIdentifier\": {\n                \"id\": \"3\"\n            },\n            \"type\": \"question\",\n            \"title\": \"Medication?\",\n            \"text\": \"Are you using any medication\",\n            \"answerFormat\": {\n                \"type\": \"bool\",\n                \"positiveAnswer\": \"Yes\",\n                \"negativeAnswer\": \"No\",\n                \"result\": \"POSITIVE\"\n            }\n        },    \n        {\n            \"stepIdentifier\": {\n                \"id\": \"10\"\n            },\n            \"type\": \"completion\",\n            \"text\": \"Thanks for taking the survey, we will contact you soon!\",\n            \"title\": \"Done!\",\n            \"buttonText\": \"Submit survey\"\n        }\n    ]\n}\n```\n\n\nYou can find the complete example [HERE](https://github.com/quickbirdstudios/survey_kit/blob/main/example/assets/example_json.json)\n  \n\n# 👤 Author\nThis Flutter library is created with 💙 by [QuickBird Studios](https://quickbirdstudios.com/).\n\n# ❤️ Contributing\nOpen an issue if you need help, if you found a bug, or if you want to discuss a feature request.\n\nOpen a PR if you want to make changes to SurveyKit.\n\n# 📃 License\nSurveyKit is released under an MIT license. See [License](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickbirdeng%2Fsurvey_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquickbirdeng%2Fsurvey_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquickbirdeng%2Fsurvey_kit/lists"}