research_package 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 69

Research Package #

pub package

This is a Flutter package implementing support for surveys and obtaining informed consent containing models, UI elements and screens. The motivation is coming from two similar native libraries ResearchStack and ResearchKit.

The main modules of the above mentioned libraries are:

Getting Started #

Research Package is published to Pub: pub package

You can start using it by adding it to your dependencies.

After you run the flutter packages get command you are able to import and start using Research Package. With the following line you have access both to the Model and the UI part of the package.

import 'package:research_package/model.dart';
import 'package:research_package/ui.dart';

Remember, that objects starting with RP are part of the Model (like RPConsentDocument) while those which start with RPUI are part of the UI library (like RPUIVisualConsentStep).

Example application #

To get an overview of Research Package's features please have a look at the example application available in this folder.

Similarity to ResearchKit and ResearchStack #

Research Package is clearly similar to these two existent framework. A goal with the package was to help developers enjoy the same features with Flutter's cross-platform framework. The names, functionalities and most of the logic are similar or identical to the previously mentioned two framework. This way we believe that the transition for those who have used them before will be easier and smoother.

Current stage #

The project is work in progress. New Answer Formats are being added to the survey module of the framework constanly. The available Answer Formats are the following at the moment:

  • Single Choice
  • Multiple Choice
  • Integer

Use Cases #

One of the goals for the package was to make it capable of handling a WHO5 survey. As an example at this point Research Package can obtain the informed consent from the participant, show the WHO5 survey questions and collect the results.

Naming #

We are following Apple's pattern when it comes to naming. There's a prefix ORK (Open Research Kit) before the names of classes, types etc. in ResearchKit, so our names are starting with the RP prefix which stands for Research Package.

For UI widgets we are using the RPUI (Research Package UI) prefix.

In order to familiarize with the Framework and potentially extend it, it's might worth to have a look at these links about Research Kit and Research Stack.

0.1.1 #

  • json_annotation dependency updated to ^3.0.0
  • rx_dart dependency updated to ^0.22.0

0.1.0 #

  • Form Step feature added
  • Bug fixing

0.0.4 #

  • Example application added

0.0.3 #

  • Initial release for Pub
  • Support for three Answer Formats
    • Single Choice
    • Multiple Choice
    • Integer

0.0.2 #

  • Added initial support for serialization to/from JSON
  • JSON serialization is available for these classes:
    • RPAnswerFormat
    • RPChoiceAnswerFormat
    • RPIntegerAnswerFormat
    • RPConsentDocument
    • RPConsentSection
    • RPSignatureResult
    • RPStepResult
    • RPTaskResult
    • RPChoice

0.0.1 #

  • Initial release
  • Entire framework done
  • Support for SingleChoice question type


Research Package Demo Application #

There is a demo application provided for Research Package. It presents the two main features: Obtaining informed consent and creating surveys.

The application can be accessed here: Demo App

All Research Packages' available step and answer types are showcased as well as a signature screen with name and signature image input.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  research_package: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:research_package/research_package.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 10, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.2

Health suggestions

Fix lib/src/ui/RPUIFormStep.dart. (-0.50 points)

Analysis of lib/src/ui/RPUIFormStep.dart reported 1 hint:

line 154 col 8: The method doesn't override an inherited method.

Format lib/src/model/answerformat/RPAnswerFormat.dart.

Run flutter format to format lib/src/model/answerformat/RPAnswerFormat.dart.

Format lib/src/model/answerformat/RPChoiceAnswerFormat.dart.

Run flutter format to format lib/src/model/answerformat/RPChoiceAnswerFormat.dart.

Fix additional 27 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/model/answerformat/RPFormAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPFormAnswerFormat.dart.)
  • lib/src/model/answerformat/RPIntegerAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPIntegerAnswerFormat.dart.)
  • lib/src/model/blocs/BlocTask.dart (Run flutter format to format lib/src/model/blocs/BlocTask.dart.)
  • lib/src/model/consent/RPConsentDocument.dart (Run flutter format to format lib/src/model/consent/RPConsentDocument.dart.)
  • lib/src/model/consent/RPConsentReviewStep.dart (Run flutter format to format lib/src/model/consent/RPConsentReviewStep.dart.)
  • lib/src/model/consent/RPConsentSection.dart (Run flutter format to format lib/src/model/consent/RPConsentSection.dart.)
  • lib/src/model/consent/RPConsentSignature.dart (Run flutter format to format lib/src/model/consent/RPConsentSignature.dart.)
  • lib/src/model/consent/RPVisualConsentStep.dart (Run flutter format to format lib/src/model/consent/RPVisualConsentStep.dart.)
  • lib/src/model/result/RPConsentSignatureResult.dart (Run flutter format to format lib/src/model/result/RPConsentSignatureResult.dart.)
  • lib/src/model/result/RPQuestionBodyResult.dart (Run flutter format to format lib/src/model/result/RPQuestionBodyResult.dart.)
  • lib/src/model/result/RPSignatureResult.dart (Run flutter format to format lib/src/model/result/RPSignatureResult.dart.)
  • lib/src/model/result/RPStepResult.dart (Run flutter format to format lib/src/model/result/RPStepResult.dart.)
  • lib/src/model/result/RPTaskResult.dart (Run flutter format to format lib/src/model/result/RPTaskResult.dart.)
  • lib/src/model/step/RPFormStep.dart (Run flutter format to format lib/src/model/step/RPFormStep.dart.)
  • lib/src/model/step/RPInstructionStep.dart (Run flutter format to format lib/src/model/step/RPInstructionStep.dart.)
  • lib/src/model/step/RPQuestionStep.dart (Run flutter format to format lib/src/model/step/RPQuestionStep.dart.)
  • lib/src/model/step/RPStep.dart (Run flutter format to format lib/src/model/step/RPStep.dart.)
  • lib/src/model/task/RPOrderedTask.dart (Run flutter format to format lib/src/model/task/RPOrderedTask.dart.)
  • lib/src/ui/QuestionBody/RPUIChoiceQuestionBody.dart (Run flutter format to format lib/src/ui/QuestionBody/RPUIChoiceQuestionBody.dart.)
  • lib/src/ui/QuestionBody/RPUIIntegerQuestionBody.dart (Run flutter format to format lib/src/ui/QuestionBody/RPUIIntegerQuestionBody.dart.)
  • lib/src/ui/RPStyles.dart (Run flutter format to format lib/src/ui/RPStyles.dart.)
  • lib/src/ui/RPUICompletionStep.dart (Run flutter format to format lib/src/ui/RPUICompletionStep.dart.)
  • lib/src/ui/RPUIConsentReviewStep.dart (Run flutter format to format lib/src/ui/RPUIConsentReviewStep.dart.)
  • lib/src/ui/RPUIOrderedTask.dart (Run flutter format to format lib/src/ui/RPUIOrderedTask.dart.)
  • lib/src/ui/RPUIOrderedTask_versions.dart (Run flutter format to format lib/src/ui/RPUIOrderedTask_versions.dart.)
  • lib/src/ui/RPUIQuestionStep.dart (Run flutter format to format lib/src/ui/RPUIQuestionStep.dart.)
  • lib/src/ui/RPUIVisualConsentStep.dart (Run flutter format to format lib/src/ui/RPUIVisualConsentStep.dart.)


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
json_annotation ^3.0.0 3.0.0
rxdart ^0.22.0 0.22.6 0.23.0-dev.3
signature ^2.0.0 2.0.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
build_runner ^1.0.0
json_serializable ^3.0.0
test ^1.6.3