Skip to content

RPConsentDocument

Represents the content of an informed consent document.

Research Package uses RPConsentDocument to provide content for RPVisualConsentStep where the content if presented to the participant and for RPConsentReviewStep where the user can review and sign the document. The building blocks of a consent document are sections. They hold the content which is presented and later agreed by the participant. By adding signatures to the consent document the parameters of the signature(s) to collect can be specified.

Inheritance
Annotations

Constructors

RPConsentDocument.fromJson

RPConsentDocument.fromJson(
  1. Map<String, dynamic> json
)

RPConsentDocument

RPConsentDocument({
  1. required String title,
  2. required List<RPConsentSection> sections,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

sections

List<RPConsentSection> sections
getter/setter pair

The sections which hold the content of the consent document

All sections appear in the animated process of RPVisualConsentStep. Also their content is presented during RPConsentReviewStep.

signatures

List<RPConsentSignature> signatures
getter/setter pair

The list of signatures that are required in the document

title

String title
getter/setter pair

The title of the consent document

This title is shown on the app bar during RPVisualConsentStep

Methods

addSignature

void addSignature(
  1. RPConsentSignature signature
)

Adds a signature to the list of signatures

getConsentSignatureAtIndex

RPConsentSignature getConsentSignatureAtIndex(
  1. int index
)

Returns an RPConsentSignature from the signatures array at the given index

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.