Skip to content

1. About Research Package

Barnabas Homola edited this page Sep 30, 2019 · 8 revisions

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. Following that the object names are starting with the RP prefix which stands for Research Package.

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

Limitations

Currently Research Package supports only single choice, multiple choice and integer questions at the moment.

How to set up a Research Package project

Since Research Package is not yet published to pub, in order to use it you have two ways of using it.

First is to link the Github repo in your pubspec.yaml file

  research_package:
      git:
        url: git://github.com/cph-cachet/research.package.git

Second is to clone this repo and add it manually to your pubspec.yaml file

  research_package:
    path: *PATH*/research.package

After you run 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 library of the package.

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

Note that objects starting with RP are part of the Model (e.g. RPConsentDocument) while those which start with RPUI are part of the UI library (e.g. RPUIVisualConsentStep).

Style

Research Package is accessing the parent application's style through Flutter's context feature. This means that the given Theme of the application is shared also with Research Package and appears in its styling (colors, font styles...). On how to Theme your application see the following article by the Flutter team: https://flutter.dev/docs/cookbook/design/themes

Clone this wiki locally