CameraBottomBar.fromJson constructor

CameraBottomBar.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CameraBottomBar.fromJson(Map<String, dynamic> json) =>
    CameraBottomBar(
      importButton: json.containsKey("importButton")
          ? BarButtonConfiguration.fromJson(
              json["importButton"] as Map<String, dynamic>)
          : BarButtonConfiguration(
              title: StyledText(
                  visible: false,
                  text: "?cameraImportButtonTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              accessibilityDescription:
                  "?accessibilityDescriptionCameraImportButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
      autoSnappingModeButton: json.containsKey("autoSnappingModeButton")
          ? BarButtonConfiguration.fromJson(
              json["autoSnappingModeButton"] as Map<String, dynamic>)
          : BarButtonConfiguration(
              title: StyledText(
                  visible: false,
                  text: "?cameraAutoSnapButtonTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              accessibilityDescription:
                  "?accessibilityDescriptionCameraAutoSnapButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
      manualSnappingModeButton: json.containsKey("manualSnappingModeButton")
          ? BarButtonConfiguration.fromJson(
              json["manualSnappingModeButton"] as Map<String, dynamic>)
          : BarButtonConfiguration(
              title: StyledText(
                  visible: false,
                  text: "?cameraManualSnapButtonTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              accessibilityDescription:
                  "?accessibilityDescriptionCameraManualSnapButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
      shutterButton: json.containsKey("shutterButton")
          ? ShutterButton.fromJson(
              json["shutterButton"] as Map<String, dynamic>)
          : ShutterButton(
              accessibilityDescription:
                  "?accessibilityDescriptionCameraShutterButton"),
      torchOnButton: json.containsKey("torchOnButton")
          ? BarButtonConfiguration.fromJson(
              json["torchOnButton"] as Map<String, dynamic>)
          : BarButtonConfiguration(
              title: StyledText(
                  visible: false,
                  text: "?cameraTorchOnButtonTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              accessibilityDescription:
                  "?accessibilityDescriptionCameraTorchOnButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
      torchOffButton: json.containsKey("torchOffButton")
          ? BarButtonConfiguration.fromJson(
              json["torchOffButton"] as Map<String, dynamic>)
          : BarButtonConfiguration(
              title: StyledText(
                  visible: false,
                  text: "?cameraTorchOffButtonTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              accessibilityDescription:
                  "?accessibilityDescriptionCameraTorchOffButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 0.0),
              icon: IconStyle(color: ScanbotColor("?sbColorOnPrimary"))),
      previewButton: json.containsKey("previewButton")
          ? PreviewButton.fromJson(
              json["previewButton"] as Map<String, dynamic>)
          : PagePreviewMode(),
    );