ConsentMessageStyleConfigurationModel.fromJson constructor
ConsentMessageStyleConfigurationModel.fromJson(
- Map<String, dynamic>? rawJson
)
Implementation
factory ConsentMessageStyleConfigurationModel.fromJson(
Map<String, dynamic>? rawJson) {
return ConsentMessageStyleConfigurationModel(
BarBackgroundColor: Color(int.parse(
rawJson?["bar_background_color"].toString().replaceAll("#", "0xFF") ??
"0xFFFFFFFF")),
BarBackgroundOpacityPercentage: double.parse(
rawJson?["bar_background_opacity_percentage"].toString() ?? "0"),
BarTextColor: Color(int.parse(
rawJson?["bar_text_color"].toString().replaceAll("#", "0xFF") ??
"0xFFFFFFFF")),
ButtonBackgroundColor: Color(int.parse(rawJson?["button_background_color"]
.toString()
.replaceAll("#", "0xFF") ??
"0xFFFFFFFF")),
ButtonTextColor: Color(int.parse(
rawJson?["button_text_color"].toString().replaceAll("#", "0xFF") ??
"0xFFFFFFFF")),
ConsentDetail:
ConsentMessageStyleConfigurationConsentDetailModel.fromJson(
rawJson?["consent_detail"]),
);
}