ui library
The UI library of Research Package.
Normally you don't need to use these widgets directly. After creating the model objects from research_package_model
and adding them to an RPTask you can present the different elements by passing it to an RPUITask.
This library contains various UI representations (Widgets) of the objects declared in research_package_model.
Many of these Widgets are responsible for making the collected results accessible to others.
Also contains general styles, UI statics used in Research Package UI in RPStyles.
Classes
- AssetLocalizationLoader
-
A LocalizationLoader which can load translations from file assets
bundles. Remember to add the language file assets to the
pubspec.yamlfile. - AssetLocalizations
- Localization support using assets files.
- AssetLocalizationsDelegate
-
A factory for a set of localized resources of type
AssetLocalizations, to be loaded by a Localizations widget. - AudioPlayerWidget
- DataCollectionListItem
- DataCollectionListItemState
- FullscreenVideoPlayer
- InstructionImage
- InstructionImageState
- LocalizationLoader
- Interface for location loaders who knows how to load a translation map for a Locale.
- MapLocalizationLoader
- A LocalizationLoader which can load translations from a map.
- RPActivityEventLogger
- The information logger used in RPUIActivityStep. It fills and modifies a RPActivityResult with events from an activity.
- RPLocalizations
- Localization support for Research Package using LocalizationLoader configurations.
- RPLocalizationsDelegate
- RPPermissions
- Requests the OS permissions declared on the sections of a RPConsentDocument.
- The navigation of an RPUITask, handed to an RPBottomNavigationBuilder. It exposes what the default bottom bar does — advance, go back, cancel — together with the state those actions depend on, so that a custom bar can be built without reaching into the task's internals.
- RPUIActivityStep
- The UI representation of the RPActivityStep. This widget is the container, the concrete content depends on the input step's runtimeType.
- RPUIActivityStepState
- RPUIChoiceQuestionBody
-
The UI representation of RPChoiceAnswerFormat. This UI part appears embedded in a RPUIQuestionStep.
Depending on the RPChoiceAnswerFormat's
ChoiceAnswerStyleproperty, the user can select only one or multiple options. - RPUIChoiceQuestionBodyState
- RPUICompletionStep
- The UI representation of RPCompletionStep Typically, you don’t need to instantiate a completion step widget directly. Instead, add a completion step to a task, and present the task with a task widget. The task widget instantiates the step widget for the completion step.
- RPUICompletionStepState
- RPUIConsentReviewStep
- The UI representation of RPConsentReviewStep
- RPUIConsentReviewStepState
- RPUIDateTimeQuestionBody
- RPUIDateTimeQuestionBodyState
- RPUIDoubleQuestionBody
- RPUIDoubleQuestionBodyState
- RPUIFormStep
- RPUIFormStepState
- RPUIImageChoiceQuestionBody
- RPUIImageChoiceQuestionBodyState
- RPUIInstructionStep
- The UI representation of RPInstructionStep In general, you don’t need to instantiate an instruction step widget directly. Instead, add an instruction step to a task and present the task using a task widget. When appropriate, the task widget instantiates the step widget for the step.
- RPUIInstructionStepState
- RPUIIntegerQuestionBody
- RPUIIntegerQuestionBodyState
- RPUIQuestionStep
- The UI representation of the RPQuestionStep.
- RPUIQuestionStepState
- RPUISliderQuestionBody
- RPUISliderQuestionBodyState
- RPUITask
- This class is the primary entry point for the presentation of the Research Package framework UI. It presents the steps of an RPOrderedTask (either navigable or just linear) and then provides the RPTaskResult object.
- RPUITaskState
- RPUITextInputQuestionBody
- RPUITextInputQuestionBodyState
- RPUITimerStep
- The UI representation of the RPQuestionStep. This widget is the container, the concrete content depends on the input step's RPAnswerFormat.
- RPUITimerStepState
- RPUIVisualConsentStep
- The UI representation of RPVisualConsentStep
- RPUIVisualConsentStepState
- VideoApp
- VideoAppState
Enums
- ActivityStatus
-
The three stages each test consists of.
These can be exclude using
includeInstructionsorincludeResults.
Typedefs
-
Signature for building a replacement for the default bottom navigation shown
at the bottom of an RPUITask.
navigationcarries the actions of the task — advancing, going back and cancelling — so a custom bar drives the task the same way the default one does. See RPTaskNavigation. - RPCarouselBarBuilder = Widget Function(BuildContext context, int stepIndex, int stepCount)
-
Signature for building a replacement for the default carousel bar shown at
the top of an RPUITask.
stepIndexis the zero-based index of the step currently on screen.stepCountis the number of steps in the task — for an RPNavigableOrderedTask not every step is necessarily shown, so it is an upper bound rather than an exact total.