Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ private fun CustomizationColor.serialize(): Any {
"toggleDisabledBackground" to toggleDisabledBackground,
"toggleDisabledIcon" to toggleDisabledIcon,
"secondLayerTab" to secondLayerTab,
"moreBtnText" to moreBtnText,
"moreBtnBackground" to moreBtnBackground,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ internal object GetCMPDataMock {
"toggleActiveIcon" to null,
"toggleDisabledBackground" to null,
"toggleDisabledIcon" to null,
"secondLayerTab" to null
"secondLayerTab" to null,
"moreBtnText" to null,
"moreBtnBackground" to null
),
"font" to mapOf(
"family" to "BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif",
Expand Down
2 changes: 2 additions & 0 deletions ios/Classes/Serializer/CMPDataSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ extension CustomizationColor {
"toggleDisabledBackground" : self.toggleDisabledBackground,
"toggleDisabledIcon" : self.toggleDisabledIcon,
"secondLayerTab" : self.secondLayerTab,
"moreBtnText" : self.moreBtnText,
"moreBtnBackground" : self.moreBtnBackground,
]
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/src/internal/serializer/customization_serializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class CustomizationColorSerializer {
toggleDisabledBackground: value['toggleDisabledBackground'] ?? "",
toggleDisabledIcon: value['toggleDisabledIcon'] ?? "",
secondLayerTab: value['secondLayerTab'] ?? "",
moreBtnText: value['moreBtnText'] ?? "",
moreBtnBackground: value['moreBtnBackground'] ?? "",
);
}
}
12 changes: 10 additions & 2 deletions lib/src/model/customization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ class CustomizationColor {
required this.toggleDisabledBackground,
required this.toggleDisabledIcon,
required this.secondLayerTab,
required this.moreBtnText,
required this.moreBtnBackground,
});

final String primary;
Expand All @@ -106,6 +108,8 @@ class CustomizationColor {
final String toggleDisabledBackground;
final String toggleDisabledIcon;
final String secondLayerTab;
final String moreBtnText;
final String moreBtnBackground;

@override
bool operator ==(Object other) =>
Expand All @@ -130,7 +134,9 @@ class CustomizationColor {
toggleActiveIcon == other.toggleActiveIcon &&
toggleDisabledBackground == other.toggleDisabledBackground &&
toggleDisabledIcon == other.toggleDisabledIcon &&
secondLayerTab == other.secondLayerTab;
secondLayerTab == other.secondLayerTab &&
moreBtnText == other.moreBtnText &&
moreBtnBackground == other.moreBtnBackground;

@override
int get hashCode =>
Expand All @@ -152,7 +158,9 @@ class CustomizationColor {
toggleActiveIcon.hashCode +
toggleDisabledBackground.hashCode +
toggleDisabledIcon.hashCode +
secondLayerTab.hashCode;
secondLayerTab.hashCode +
moreBtnText.hashCode +
moreBtnBackground.hashCode;

@override
String toString() => "$CustomizationColor($hashCode)";
Expand Down
4 changes: 4 additions & 0 deletions test/internal/bridge/get_cmp_data_bridge_test.mock.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ const _responseCustomization = {
"toggleDisabledBackground": null,
"toggleDisabledIcon": null,
"secondLayerTab": null,
"moreBtnText": null,
"moreBtnBackground": null,
},
"font": {
"family":
Expand Down Expand Up @@ -701,6 +703,8 @@ const _expectedCustomization = UsercentricsCustomization(
toggleDisabledBackground: "",
toggleDisabledIcon: "",
secondLayerTab: "",
moreBtnText: "",
moreBtnBackground: "",
),
font: CustomizationFont(
family:
Expand Down
Loading