CreditCardScannerIntroScreenConfiguration.fromJson constructor
CreditCardScannerIntroScreenConfiguration.fromJson( - Map<String, dynamic> json
)
Implementation
factory CreditCardScannerIntroScreenConfiguration.fromJson(
Map<String, dynamic> json) =>
CreditCardScannerIntroScreenConfiguration(
image: json.containsKey("image")
? CreditCardScannerIntroImage.fromJson(
json["image"] as Map<String, dynamic>)
: CreditCardIntroOneSideImage(),
backgroundColor: json.containsKey("backgroundColor")
? ScanbotColor(json["backgroundColor"] as String)
: ScanbotColor("?sbColorSurface"),
dividerColor: json.containsKey("dividerColor")
? ScanbotColor(json["dividerColor"] as String)
: ScanbotColor("?sbColorOutline"),
handlerColor: json.containsKey("handlerColor")
? ScanbotColor(json["handlerColor"] as String)
: ScanbotColor("?sbColorOutline"),
showAutomatically: json.containsKey("showAutomatically")
? (json["showAutomatically"] as bool)
: false,
title: json.containsKey("title")
? StyledText.fromJson(json["title"] as Map<String, dynamic>)
: StyledText(
text: "?introScreenTitle",
color: ScanbotColor("?sbColorOnSurface")),
explanation: json.containsKey("explanation")
? StyledText.fromJson(json["explanation"] as Map<String, dynamic>)
: StyledText(
text: "?introScreenText",
color: ScanbotColor("?sbColorOnSurface")),
doneButton: json.containsKey("doneButton")
? ButtonConfiguration.fromJson(
json["doneButton"] as Map<String, dynamic>)
: ButtonConfiguration(
text: "?introScreenDoneButton",
accessibilityDescription:
"?accessibilityDescriptionIntroScreenDoneButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("?sbColorPrimary"),
strokeWidth: 0.0),
foreground:
ForegroundStyle(color: ScanbotColor("?sbColorOnPrimary"))),
);