diff --git a/android/src/main/kotlin/com/usercentrics/sdk/flutter/serializer/CMPDataSerializer.kt b/android/src/main/kotlin/com/usercentrics/sdk/flutter/serializer/CMPDataSerializer.kt index 4266e25..75ccb32 100644 --- a/android/src/main/kotlin/com/usercentrics/sdk/flutter/serializer/CMPDataSerializer.kt +++ b/android/src/main/kotlin/com/usercentrics/sdk/flutter/serializer/CMPDataSerializer.kt @@ -227,7 +227,8 @@ private fun TCF2Settings.serialize(): Any { "changedPurposes" to changedPurposes?.serialize(), "acmV2Enabled" to acmV2Enabled, "selectedATPIds" to selectedATPIds, - "consentOrPay" to consentOrPay?.serialize() + "consentOrPay" to consentOrPay?.serialize(), + "mandatoryLabel" to mandatoryLabel ) } diff --git a/ios/Classes/Serializer/CMPDataSerializer.swift b/ios/Classes/Serializer/CMPDataSerializer.swift index 7219691..e8d8f48 100644 --- a/ios/Classes/Serializer/CMPDataSerializer.swift +++ b/ios/Classes/Serializer/CMPDataSerializer.swift @@ -217,7 +217,8 @@ extension TCF2Settings { "changedPurposes": self.changedPurposes?.serialize() as Any, "acmV2Enabled" : self.acmV2Enabled, "selectedATPIds" : self.selectedATPIds, - "consentOrPay": self.consentOrPay?.serialize() as Any + "consentOrPay": self.consentOrPay?.serialize() as Any, + "mandatoryLabel": self.mandatoryLabel ] } } diff --git a/lib/src/internal/serializer/tcf2_settings_serializer.dart b/lib/src/internal/serializer/tcf2_settings_serializer.dart index f43b048..59a2c76 100644 --- a/lib/src/internal/serializer/tcf2_settings_serializer.dart +++ b/lib/src/internal/serializer/tcf2_settings_serializer.dart @@ -70,7 +70,8 @@ class TCF2SettingsSerializer { acmV2Enabled: value['acmV2Enabled'] ?? false, selectedATPIds: value['selectedATPIds']?.cast() ?? [], consentOrPay: TCF2ConsentOrPaySettingsSerializer.deserialize( - value['consentOrPay'])); + value['consentOrPay']), + mandatoryLabel: value['mandatoryLabel'] ?? "Mandatory"); } } diff --git a/lib/src/model/tcf2_settings.dart b/lib/src/model/tcf2_settings.dart index 0c84616..9346e63 100644 --- a/lib/src/model/tcf2_settings.dart +++ b/lib/src/model/tcf2_settings.dart @@ -61,7 +61,8 @@ class TCF2Settings { required this.changedPurposes, required this.acmV2Enabled, required this.selectedATPIds, - this.consentOrPay}); + this.consentOrPay, + this.mandatoryLabel = "Mandatory"}); final String firstLayerTitle; final String secondLayerTitle; @@ -123,6 +124,7 @@ class TCF2Settings { final bool acmV2Enabled; final List selectedATPIds; final TCF2ConsentOrPaySettings? consentOrPay; + final String mandatoryLabel; @override bool operator ==(Object other) => @@ -192,7 +194,8 @@ class TCF2Settings { changedPurposes == other.changedPurposes && acmV2Enabled == other.acmV2Enabled && listEquals(selectedATPIds, other.selectedATPIds) && - consentOrPay == other.consentOrPay; + consentOrPay == other.consentOrPay && + mandatoryLabel == other.mandatoryLabel; @override int get hashCode => @@ -255,7 +258,8 @@ class TCF2Settings { changedPurposes.hashCode + acmV2Enabled.hashCode + selectedATPIds.hashCode + - consentOrPay.hashCode; + consentOrPay.hashCode + + mandatoryLabel.hashCode; @override String toString() => "$TCF2Settings($hashCode)";