CroppingScreenConfiguration.fromJson constructor
CroppingScreenConfiguration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CroppingScreenConfiguration.fromJson(Map<String, dynamic> json) =>
CroppingScreenConfiguration(
topBarBackButton: json.containsKey("topBarBackButton")
? ButtonConfiguration.fromJson(
json["topBarBackButton"] as Map<String, dynamic>)
: ButtonConfiguration(
visible: true,
text: "?croppingTopBarCancelButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionCroppingTopBarCancelButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
foreground: ForegroundStyle(
iconVisible: true,
color: ScanbotColor("?sbColorOnPrimary"),
useShadow: false)),
topBarTitle: json.containsKey("topBarTitle")
? StyledText.fromJson(json["topBarTitle"] as Map<String, dynamic>)
: StyledText(
text: "?croppingScreenTitle",
color: ScanbotColor("?sbColorOnPrimary")),
topBarConfirmButton: json.containsKey("topBarConfirmButton")
? ButtonConfiguration.fromJson(
json["topBarConfirmButton"] as Map<String, dynamic>)
: ButtonConfiguration(
visible: true,
text: "?croppingTopBarConfirmButtonTitle",
accessibilityDescription:
"?accessibilityDescriptionCroppingTopBarConfirmButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 0.0),
foreground: ForegroundStyle(
iconVisible: true,
color: ScanbotColor("?sbColorOnPrimary"),
useShadow: false)),
backgroundColor: json.containsKey("backgroundColor")
? ScanbotColor(json["backgroundColor"] as String)
: ScanbotColor("?sbColorOutline"),
croppingHandlerColor: json.containsKey("croppingHandlerColor")
? ScanbotColor(json["croppingHandlerColor"] as String)
: ScanbotColor("?sbColorSurface"),
croppingPolygonColor: json.containsKey("croppingPolygonColor")
? ScanbotColor(json["croppingPolygonColor"] as String)
: ScanbotColor("?sbColorSurface"),
bottomBar: json.containsKey("bottomBar")
? CroppingBottomBar.fromJson(
json["bottomBar"] as Map<String, dynamic>)
: CroppingBottomBar(),
);