ReviewScreenConfiguration.fromJson constructor
ReviewScreenConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ReviewScreenConfiguration.fromJson(Map<String, dynamic> json) =>
ReviewScreenConfiguration(
enabled: json.containsKey("enabled") ? (json["enabled"] as bool) : true,
topBarTitle: json.containsKey("topBarTitle")
? StyledText.fromJson(json["topBarTitle"] as Map<String, dynamic>)
: StyledText(
text: "?reviewScreenTitle",
color: ScanbotColor("?sbColorOnPrimary")),
topBarMoreButton: json.containsKey("topBarMoreButton")
? IconButton.fromJson(
json["topBarMoreButton"] as Map<String, dynamic>)
: IconButton(
color: ScanbotColor("?sbColorOnPrimary"),
accessibilityDescription:
"?accessibilityDescriptionReviewMoreButton"),
topBarBackButton: json.containsKey("topBarBackButton")
? ButtonConfiguration.fromJson(
json["topBarBackButton"] as Map<String, dynamic>)
: ButtonConfiguration(
visible: true,
text: "?reviewTopBarBackButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewTopBarBackButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
foreground: ForegroundStyle(
iconVisible: true,
color: ScanbotColor("?sbColorOnPrimary"),
useShadow: false)),
morePopup: json.containsKey("morePopup")
? ReviewMorePopupMenu.fromJson(
json["morePopup"] as Map<String, dynamic>)
: ReviewMorePopupMenu(),
zoomButton: json.containsKey("zoomButton")
? RoundButton.fromJson(json["zoomButton"] as Map<String, dynamic>)
: RoundButton(
accessibilityDescription:
"?accessibilityDescriptionReviewZoomButton",
backgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
foregroundColor: ScanbotColor("?sbColorOnPrimary")),
zoomOverlay: json.containsKey("zoomOverlay")
? ZoomOverlay.fromJson(json["zoomOverlay"] as Map<String, dynamic>)
: ZoomOverlay(),
backgroundColor: json.containsKey("backgroundColor")
? ScanbotColor(json["backgroundColor"] as String)
: ScanbotColor("?sbColorOnSurfaceVariant"),
bottomBar: json.containsKey("bottomBar")
? ReviewBottomBarConfiguration.fromJson(
json["bottomBar"] as Map<String, dynamic>)
: ReviewBottomBarConfiguration(),
switchNextPageButton: json.containsKey("switchNextPageButton")
? IconButton.fromJson(
json["switchNextPageButton"] as Map<String, dynamic>)
: IconButton(
color: ScanbotColor("?sbColorOnPrimary"),
accessibilityDescription:
"?accessibilityDescriptionReviewNextPageButton"),
switchPreviousPageButton: json.containsKey("switchPreviousPageButton")
? IconButton.fromJson(
json["switchPreviousPageButton"] as Map<String, dynamic>)
: IconButton(
color: ScanbotColor("?sbColorOnPrimary"),
accessibilityDescription:
"?accessibilityDescriptionReviewPreviousPageButton"),
pageCounter: json.containsKey("pageCounter")
? UserGuidanceConfiguration.fromJson(
json["pageCounter"] as Map<String, dynamic>)
: UserGuidanceConfiguration(
title: StyledText(
text: "?reviewScreenPageCount",
color: ScanbotColor("?sbColorOnPrimary")),
background: BackgroundStyle(
fillColor: ScanbotColor("?sbColorSurfaceHigh"),
strokeWidth: 0.0)),
deleteAllPagesAlertDialog: json.containsKey("deleteAllPagesAlertDialog")
? ScanbotAlertDialog.fromJson(
json["deleteAllPagesAlertDialog"] as Map<String, dynamic>)
: ScanbotAlertDialog(
title: StyledText(
text: "?reviewDeleteAllPagesAlertTitle",
color: ScanbotColor("?sbColorOnSurface")),
subtitle: StyledText(
text: "?reviewDeleteAllPagesAlertSubtitle",
color: ScanbotColor("?sbColorOnSurfaceVariant")),
okButton: ButtonConfiguration(
text: "?reviewDeleteAllPagesAlertDeleteButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewDeleteAllPagesAlertDeleteButton",
background: BackgroundStyle(
fillColor: ScanbotColor("?sbColorPrimary"),
strokeWidth: 0.0),
foreground: ForegroundStyle(
color: ScanbotColor("?sbColorOnPrimary"))),
actionButton: ButtonConfiguration(visible: false),
cancelButton: ButtonConfiguration(
text: "?reviewDeleteAllPagesAlertCancelButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewDeleteAllPagesAlertCancelButton",
background: BackgroundStyle(
fillColor: ScanbotColor("#00000000"), strokeWidth: 0.0),
foreground: ForegroundStyle(
color: ScanbotColor("?sbColorPrimary")))),
deletePageAlertDialog: json.containsKey("deletePageAlertDialog")
? ScanbotAlertDialog.fromJson(
json["deletePageAlertDialog"] as Map<String, dynamic>)
: ScanbotAlertDialog(
title: StyledText(
text: "?reviewDeletePageAlertTitle",
color: ScanbotColor("?sbColorOnSurface")),
subtitle: StyledText(
text: "?reviewDeletePageAlertSubTitle",
color: ScanbotColor("?sbColorOnSurfaceVariant")),
okButton: ButtonConfiguration(
text: "?reviewDeletePageAlertConfirmButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewDeletePageAlertConfirmButton",
background: BackgroundStyle(
fillColor: ScanbotColor("?sbColorPrimary"),
strokeWidth: 0.0),
foreground: ForegroundStyle(
color: ScanbotColor("?sbColorOnPrimary"))),
actionButton: ButtonConfiguration(
text: "?reviewDeletePageAlertDeleteRetakeButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewDeletePageAlertDeleteRetakeButton",
background: BackgroundStyle(
fillColor: ScanbotColor("#00000000"), strokeWidth: 0.0),
foreground: ForegroundStyle(
color: ScanbotColor("?sbColorPrimary"))),
cancelButton: ButtonConfiguration(
text: "?reviewDeletePageAlertCancelButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionReviewDeletePageAlertCancelButton",
background: BackgroundStyle(
fillColor: ScanbotColor("#00000000"), strokeWidth: 0.0),
foreground: ForegroundStyle(
color: ScanbotColor("?sbColorPrimary")))),
);