research_package 0.2.0+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 71

Research Package #

pub package

ResearchPackage is a Flutter package for building research study apps on Android and iOS using Flutter.

ResearchPackage is a Flutter implementation of the Apple ResearchKit available for iOS (just like ResearchStack is for Android). The overarching goal of ResearchPackage is to enable developers and researchers to design and build cross-platform (iOS and Android) research applications using the same codebase. The API and UX design of ResearchPackage follows the API and UX of ResearchKit almost 1:1 (with a few adaptations to Flutter, including applying more to a reactive programming model).

ResearchPackage is designed from the ground up to meet the requirements of most scientific research, including capturing participant consent, extensible input tasks, and the security and privacy needs necessary for IRB approval. The main features of ResearchPackage are:

  • Obtaining informed consent from participants, including support for a signature.
  • Creating surveys and questionnaires with a wide range of answer formats (e.g., likert scale, date pickers, image pickers, etc.), such as the WHO5 survey.

ResearchPackage is part of the overall CACHET Research Platform (CARP) with also provides a Flutter package for mobile and wearable sensing -- called CARP Mobile Sensing. By combining ResearchPackage with CARP Mobile Sensing, support for what is called "Active Tasks" in ResearchKit can be implemented.

Documentation #

There is a set of tutorials, describing:

The ResearchPackage Flutter API is available (and maintained) as part of the package release at pub.dev.

Example Application #

There is an example application which demonstrates the different features of ResearchPackage as implemented in a Flutter app.

Who is backing this project? #

Research Package is made by the Copenhagen Center for Health Technology (CACHET) and is used in a number of applications and studies. The current project maintainers are Barnabás Homola, Mads Vedel Saaby Christensen, and Jakob E. Bardram.

How can I contribute? #

We are more than happy to take contributions and feedback. Use the Issues page to file an issue or feature request. Besides general help for enhacement and quality assurance (bug fixing), we welcome input on new answer types.

0.2.0 #

  • Support for Navigable Tasks
    • Branching support with RPDirectStepNavigationRule and RPPredicateStepNavigationRule
    • Navigation to previous questions
    • Currently supports:
      • Boolean Answer Format
      • Choice Answer Format
  • Localization added
    • Demo app available now in English and Danish
  • Support for new Answer Format
    • Boolean
  • UI updates, bug fixes

0.1.2 #

  • Support for new Answer Formats
    • Slider
    • Date and Time
    • Image Choice
  • rx_dart dependency updated to ^0.23.0
  • Small bug fixes and documentation update

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

example/README.md

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:


dependencies:
  research_package: ^0.2.0+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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
48
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Apr 6, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/src/ui/QuestionBody/RPUIDateTimeQuestionBody.dart. (-1 points)

Analysis of lib/src/ui/QuestionBody/RPUIDateTimeQuestionBody.dart reported 2 hints:

line 3 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: RPUIDateTimeQuestionBody.mode

line 22 col 10: The value of the field '_errorMessage' isn't used.

Fix lib/model.g.dart. (-0.50 points)

Analysis of lib/model.g.dart reported 1 hint:

line 220 col 22: The declaration '_$RPImageChoiceToJson' isn't referenced.

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

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

line 16 col 10: The value of the field '_errorMessage' isn't used.

Fix additional 34 files with analysis or formatting issues. (-1 points)

Additional issues in the following files:

  • lib/src/ui/RPUIFormStep.dart (1 hint)
  • lib/src/ui/RPUITask.dart (1 hint)
  • lib/src/model/answerformat/RPAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPAnswerFormat.dart.)
  • lib/src/model/answerformat/RPBooleanAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPBooleanAnswerFormat.dart.)
  • lib/src/model/answerformat/RPChoiceAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPChoiceAnswerFormat.dart.)
  • 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/RPNavigableOrderedTask.dart (Run flutter format to format lib/src/model/task/RPNavigableOrderedTask.dart.)
  • lib/src/model/task/RPOrderedTask.dart (Run flutter format to format lib/src/model/task/RPOrderedTask.dart.)
  • lib/src/model/task/RPPredicateStepNavigationRule.dart (Run flutter format to format lib/src/model/task/RPPredicateStepNavigationRule.dart.)
  • lib/src/model/task/RPResultPredicate.dart (Run flutter format to format lib/src/model/task/RPResultPredicate.dart.)
  • lib/src/model/task/RPStepNavigationRule.dart (Run flutter format to format lib/src/model/task/RPStepNavigationRule.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/RPUIInstructionStep.dart (Run flutter format to format lib/src/ui/RPUIInstructionStep.dart.)
  • lib/src/ui/RPUIQuestionStep.dart (Run flutter format to format lib/src/ui/RPUIQuestionStep.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (signature).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_localizations 0.0.0
json_annotation ^3.0.0 3.0.1
rxdart ^0.23.0 0.23.1 0.24.0-dev.1
signature ^2.0.0 2.0.1 3.0.0
Transitive dependencies
collection 1.14.11 1.14.12
intl 0.16.0 0.16.1
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
build_runner ^1.0.0
flutter_test
json_serializable ^3.0.0
test ^1.6.3