RPConsentSection constructor
RPConsentSection({
- required RPConsentSectionType type,
- String? title,
- String? summary,
- String? content,
- List<
RPDataTypeSection> ? dataTypes, - Widget? customIllustration,
Returns a populated object with the given type
.
It is enough to provide only the type
of the section, the title is
automatically filled out. If a title is provided, that title is used instead.
summary
is set to null
initially.
If creating a custom section, a title must be provided.
Implementation
RPConsentSection(
{required this.type,
String? title,
this.summary,
this.content,
this.dataTypes,
this.customIllustration}) {
assert(type != RPConsentSectionType.Custom || title != null,
"If a you are creating a Custom ConsentSection, then a title must be provided.");
this.title = (type == RPConsentSectionType.Custom)
? title!
: (title != null)
? title
: _titleForConsentSectionType(type);
}