getInterpretedLabelValueDefinitions function

List<InterpretedLabelValueDefinition> getInterpretedLabelValueDefinitions(
  1. LabelerViewDetailed labelerView
)

Implementation

List<InterpretedLabelValueDefinition> getInterpretedLabelValueDefinitions(
  final LabelerViewDetailed labelerView,
) {
  return labelerView.policies.labelValueDefinitions
          ?.map((e) => getInterpretedLabelValueDefinition(
                identifier: e.identifier,
                defaultSetting:
                    LabelPreference.valueOf(e.defaultSetting?.toJson()) ??
                        LabelPreference.warn,
                severity: e.severity.toJson(),
                blurs: e.blurs.toJson(),
                adultOnly: e.adultOnly,
                definedBy: labelerView.creator.did,
              ))
          .toList() ??
      const [];
}