SingleScanningMode constructor

SingleScanningMode({
  1. bool confirmationSheetEnabled = false,
  2. bool barcodeImageVisible = true,
  3. ScanbotColor? sheetColor,
  4. ScanbotColor? dividerColor,
  5. ScanbotColor? modalOverlayColor,
  6. StyledText? barcodeTitle,
  7. StyledText? barcodeSubtitle,
  8. ButtonConfiguration? submitButton,
  9. ButtonConfiguration? cancelButton,
  10. BarcodeInfoMapping? barcodeInfoMapping,
  11. ArOverlayGeneralConfiguration? arOverlay,
})

Implementation

SingleScanningMode({
  this.confirmationSheetEnabled = false,
  this.barcodeImageVisible = true,
  ScanbotColor? sheetColor,
  ScanbotColor? dividerColor,
  ScanbotColor? modalOverlayColor,
  StyledText? barcodeTitle,
  StyledText? barcodeSubtitle,
  ButtonConfiguration? submitButton,
  ButtonConfiguration? cancelButton,
  BarcodeInfoMapping? barcodeInfoMapping,
  ArOverlayGeneralConfiguration? arOverlay,
})  : sheetColor = sheetColor ?? ScanbotColor("?sbColorSurface"),
      dividerColor = dividerColor ?? ScanbotColor("?sbColorOutline"),
      modalOverlayColor =
          modalOverlayColor ?? ScanbotColor("?sbColorModalOverlay"),
      barcodeTitle = barcodeTitle ??
          StyledText(
              text: "BARCODE_TITLE",
              color: ScanbotColor("?sbColorOnSurface")),
      barcodeSubtitle = barcodeSubtitle ??
          StyledText(
              text: "BARCODE_SUBTITLE",
              color: ScanbotColor("?sbColorOnSurfaceVariant")),
      submitButton = submitButton ??
          ButtonConfiguration(
              visible: true,
              text: "?sheetSubmitButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("?sbColorPrimary"),
                  fillColor: ScanbotColor("?sbColorPrimary"),
                  strokeWidth: 1.0),
              foreground: ForegroundStyle(
                  iconVisible: true,
                  color: ScanbotColor("?sbColorOnPrimary"))),
      cancelButton = cancelButton ??
          ButtonConfiguration(
              visible: true,
              text: "?singleModeConfirmationCancelButton",
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("#00000000"),
                  strokeWidth: 1.0),
              foreground: ForegroundStyle(
                  iconVisible: false,
                  color: ScanbotColor("?sbColorPrimary"))),
      barcodeInfoMapping = barcodeInfoMapping ??
          BarcodeInfoMapping(
              sheetColor: ScanbotColor("?sbColorSurface"),
              dividerColor: ScanbotColor("?sbColorOutline"),
              modalOverlayColor: ScanbotColor("?sbColorModalOverlay"),
              loadingMessage: StyledText(
                  text: "?barcodeInfoMappingLoadingMessage",
                  color: ScanbotColor("?sbColorPrimary")),
              errorState: BarcodeItemErrorState(
                  title: StyledText(
                      text: "?barcodeInfoMappingErrorStateTitle",
                      color: ScanbotColor("?sbColorOnSurface")),
                  subtitle: StyledText(
                      text: "?barcodeInfoMappingErrorStateSubtitle",
                      color: ScanbotColor("?sbColorOnSurfaceVariant")),
                  retryButton: ButtonConfiguration(
                      visible: true,
                      text: "?barcodeInfoMappingErrorStateRetryButton",
                      background: BackgroundStyle(
                          strokeColor: ScanbotColor("?sbColorPrimary"),
                          fillColor: ScanbotColor("?sbColorPrimary"),
                          strokeWidth: 1.0),
                      foreground: ForegroundStyle(
                          iconVisible: true,
                          color: ScanbotColor("?sbColorOnPrimary"))),
                  cancelButton: ButtonConfiguration(
                      text: "?barcodeInfoMappingErrorStateCancelButton",
                      background: BackgroundStyle(
                          strokeColor: ScanbotColor("#00000000"),
                          fillColor: ScanbotColor("#00000000"),
                          strokeWidth: 1.0),
                      foreground: ForegroundStyle(
                          iconVisible: false,
                          color: ScanbotColor("?sbColorPrimary"))))),
      arOverlay = arOverlay ??
          ArOverlayGeneralConfiguration(
              visible: false,
              counterBadge: BadgeStyle(
                  visible: true,
                  background: BackgroundStyle(
                      strokeColor: ScanbotColor("#000000FF"),
                      fillColor: ScanbotColor("?sbColorPositive"),
                      strokeWidth: 0.0),
                  foregroundColor: ScanbotColor("?sbColorOnSurface")),
              automaticSelectionEnabled: false,
              barcodeItemInfoPosition: BarcodeItemInfoPosition.BELOW,
              polygon: ArOverlayPolygonConfiguration(
                  visible: true,
                  deselected: PolygonStyle(
                      strokeColor: ScanbotColor("?sbColorSurface"),
                      fillColor: ScanbotColor("#00000000"),
                      strokeWidth: 3.0,
                      cornerRadius: 5.0),
                  selected: PolygonStyle(
                      strokeColor: ScanbotColor("?sbColorPositive"),
                      fillColor: ScanbotColor("#00000000"),
                      strokeWidth: 3.0,
                      cornerRadius: 5.0)),
              barcodeItemConfiguration: BarcodeItemConfiguration(
                  imageVisible: true,
                  titleSelected: StyledText(
                      text: "BARCODE_TITLE",
                      color: ScanbotColor("?sbColorOnSurface")),
                  subtitleSelected: StyledText(
                      text: "BARCODE_SUBTITLE",
                      color: ScanbotColor("?sbColorOnSurfaceVariant")),
                  titleDeselected: StyledText(
                      text: "BARCODE_TITLE",
                      color: ScanbotColor("?sbColorOnSurface")),
                  subtitleDeselected: StyledText(
                      visible: true,
                      text: "BARCODE_SUBTITLE",
                      color: ScanbotColor("?sbColorOnSurfaceVariant"),
                      useShadow: false),
                  backgroundSelected: PolygonStyle(
                      strokeColor: ScanbotColor("?sbColorPositive"),
                      fillColor: ScanbotColor("?sbColorPositive"),
                      strokeWidth: 1.0,
                      cornerRadius: 5.0),
                  backgroundDeselected: PolygonStyle(
                      strokeColor: ScanbotColor("?sbColorSurface"),
                      fillColor: ScanbotColor("?sbColorSurface"),
                      strokeWidth: 1.0,
                      cornerRadius: 5.0))),
      super();