ReviewBottomBarConfiguration.fromJson constructor
ReviewBottomBarConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ReviewBottomBarConfiguration.fromJson(Map<String, dynamic> json) =>
ReviewBottomBarConfiguration(
addButton: json.containsKey("addButton")
? BarButtonConfiguration.fromJson(
json["addButton"] as Map<String, dynamic>)
: BarButtonConfiguration(
title: StyledText(
text: "?reviewScreenAddButtonTitle",
color: ScanbotColor("?sbColorOnPrimary")),
accessibilityDescription:
"?accessibilityDescriptionReviewAddButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
retakeButton: json.containsKey("retakeButton")
? BarButtonConfiguration.fromJson(
json["retakeButton"] as Map<String, dynamic>)
: BarButtonConfiguration(
title: StyledText(
text: "?reviewScreenRetakeButtonTitle",
color: ScanbotColor("?sbColorOnPrimary")),
accessibilityDescription:
"?accessibilityDescriptionReviewRetakeButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
cropButton: json.containsKey("cropButton")
? BarButtonConfiguration.fromJson(
json["cropButton"] as Map<String, dynamic>)
: BarButtonConfiguration(
title: StyledText(
text: "?reviewScreenCropButtonTitle",
color: ScanbotColor("?sbColorOnPrimary")),
accessibilityDescription:
"?accessibilityDescriptionReviewCropButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
rotateButton: json.containsKey("rotateButton")
? BarButtonConfiguration.fromJson(
json["rotateButton"] as Map<String, dynamic>)
: BarButtonConfiguration(
title: StyledText(
text: "?reviewScreenRotateButtonTitle",
color: ScanbotColor("?sbColorOnPrimary")),
accessibilityDescription:
"?accessibilityDescriptionReviewRotateButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
deleteButton: json.containsKey("deleteButton")
? BarButtonConfiguration.fromJson(
json["deleteButton"] as Map<String, dynamic>)
: BarButtonConfiguration(
title: StyledText(
text: "?reviewScreenDeleteButtonTitle",
color: ScanbotColor("?sbColorOnPrimary")),
accessibilityDescription:
"?accessibilityDescriptionReviewDeleteButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
submitButton: json.containsKey("submitButton")
? ButtonConfiguration.fromJson(
json["submitButton"] as Map<String, dynamic>)
: ButtonConfiguration(
text: "?reviewScreenSubmitButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewSubmitButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("?sbColorSurface"),
fillColor: ScanbotColor("?sbColorSurface"),
strokeWidth: 0.0),
foreground:
ForegroundStyle(color: ScanbotColor("?sbColorOnSurface"))),
);