getInformedConsent method

  1. @override
Future<RPOrderedTask?> getInformedConsent({
  1. bool refresh = false,
})
override

Get the informed consent to be shown for this study.

This method return a RPOrderedTask which is an ordered list of RPStep which are shown to the user as the informed consent flow. See research_package for a description on how to create an informed consent in the research package domain model.

If there is no informed consent, null is returned.

Implementation

@override
Future<RPOrderedTask?> getInformedConsent({bool refresh = false}) async {
  // initialize json serialization for RP classes
  ResearchPackage();
  Map<String, dynamic>? json =
      await _getResource(RPOrderedTask, refresh: refresh);

  return informedConsent =
      (json != null) ? RPOrderedTask.fromJson(json) : null;
}