Skip to content

RPPermissionResult

The result of requesting the OS permissions declared on the sections of a RPConsentDocument.

It holds one RPPermissionStatus per RPPermissionType which was asked for. A permission the participant denied is still recorded — the flow is never blocked by a denial, so the study needs the record to know what it may collect.

Inheritance
Annotations

Constructors

RPPermissionResult.fromJson

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

RPPermissionResult

RPPermissionResult({
  1. required String identifier,
  2. Map<RPPermissionType, RPPermissionStatus>? statuses,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

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

statuses

Map<RPPermissionType, RPPermissionStatus> statuses
getter/setter pair

The status of each permission which was requested.

Methods

setStatus

void setStatus(
  1. RPPermissionType type,
  2. RPPermissionStatus status
)

Record the status of type, replacing any previous status for it.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.

toString

String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.