research_package 0.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • new48

Research Package #

This is a Flutter package implementing support for surveys like ResearchStack and ResearchKit.

The main modules of the above mentioned libraries are:

Current stage #

The project is work in progress. New Answer Formats are being added to the survey modul 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.

Getting Started #

In order to use Research Package, you have to clone this repo and add it manually to your pubspec.yaml file

    path: *PATH*/research.package

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).

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.

Challenges #

ResearchStack and ResearchKit are built on native iOS and Android which have totally different architecture than the Widget-based Flutter. It hopefully doesn't affect the domain model but for wiring up the model to the UI, we should definitely implement a different approach from ResearchKit and Stack.

0.0.4 #

  • Example 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.0.4

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 Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

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

Analysis of lib/model.dart reported 1 hint:

line 14 col 8: Unused import: 'dart:typed_data'.

Fix lib/src/model/step/RPFormStep.dart. (-0.50 points)

Analysis of lib/src/model/step/RPFormStep.dart reported 1 hint:

line 5 col 7: The declaration '_RPFormStep' isn't referenced.

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

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

Fix additional 27 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/model/answerformat/RPChoiceAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPChoiceAnswerFormat.dart.)
  • lib/src/model/answerformat/RPIntegerAnswerFormat.dart (Run flutter format to format lib/src/model/answerformat/RPIntegerAnswerFormat.dart.)
  • lib/src/model/blocs/BlocQuestion.dart (Run flutter format to format lib/src/model/blocs/BlocQuestion.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/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/RPUIIntegerQuestionBody.dart (Run flutter format to format lib/src/ui/QuestionBody/RPUIIntegerQuestionBody.dart.)
  • lib/src/ui/QuestionBody/RPUISingleChoiceQuestionBody.dart (Run flutter format to format lib/src/ui/QuestionBody/RPUISingleChoiceQuestionBody.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.)

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


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.3
signature ^2.0.0 2.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
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