CreditCardScannerScreenConfiguration constructor

CreditCardScannerScreenConfiguration({
  1. String version = "1.0",
  2. String screen = "CreditCardScanner",
  3. CreditCardScannerScreenTextLocalization? localization,
  4. Palette? palette,
  5. ScanbotColor? backgroundColor,
  6. CameraConfiguration? cameraConfiguration,
  7. CameraPermissionScreen? cameraPermission,
  8. UserGuidanceConfiguration? topUserGuidance,
  9. CreditCardScanGuidanceConfiguration? scanStatusUserGuidance,
  10. TopBarConfiguration? topBar,
  11. ScanbotIconButton? topBarOpenIntroScreenButton,
  12. CreditCardScannerIntroScreenConfiguration? introScreen,
  13. ActionBarConfiguration? actionBar,
  14. PermanentViewFinderConfiguration? viewFinder,
  15. CreditCardScannerConfiguration? scannerConfiguration,
  16. bool exampleOverlayVisible = true,
  17. CreditCardScanningProgressConfiguration? scanningProgress,
  18. int scanIncompleteDataTimeout = 3000,
  19. ScanCompletionOverlay? successOverlay,
  20. ScanCompletionOverlay? incompleteDataOverlay,
  21. Sound? sound,
  22. Vibration? vibration,
  23. bool keepScreenOn = true,
})

Implementation

CreditCardScannerScreenConfiguration({
  this.version = "1.0",
  this.screen = "CreditCardScanner",
  CreditCardScannerScreenTextLocalization? localization,
  Palette? palette,
  ScanbotColor? backgroundColor,
  CameraConfiguration? cameraConfiguration,
  CameraPermissionScreen? cameraPermission,
  UserGuidanceConfiguration? topUserGuidance,
  CreditCardScanGuidanceConfiguration? scanStatusUserGuidance,
  TopBarConfiguration? topBar,
  ScanbotIconButton? topBarOpenIntroScreenButton,
  CreditCardScannerIntroScreenConfiguration? introScreen,
  ActionBarConfiguration? actionBar,
  PermanentViewFinderConfiguration? viewFinder,
  CreditCardScannerConfiguration? scannerConfiguration,
  this.exampleOverlayVisible = true,
  CreditCardScanningProgressConfiguration? scanningProgress,
  this.scanIncompleteDataTimeout = 3000,
  ScanCompletionOverlay? successOverlay,
  ScanCompletionOverlay? incompleteDataOverlay,
  Sound? sound,
  Vibration? vibration,
  this.keepScreenOn = true,
})  : localization =
          localization ?? CreditCardScannerScreenTextLocalization(),
      palette = palette ?? Palette(),
      backgroundColor = backgroundColor ?? ScanbotColor("?sbColorSurfaceLow"),
      cameraConfiguration = cameraConfiguration ??
          CameraConfiguration(
              orientationLockMode: OrientationLockMode.PORTRAIT),
      cameraPermission = cameraPermission ??
          CameraPermissionScreen(
              statusBarMode: StatusBarMode.DARK,
              background: ScanbotColor("?sbColorSurface"),
              iconBackground: ScanbotColor("?sbColorOutline"),
              icon: IconStyle(
                  visible: true, color: ScanbotColor("?sbColorOnSurface")),
              enableCameraButton: ButtonConfiguration(
                  visible: true,
                  text: "?cameraPermissionEnableCameraButton",
                  accessibilityDescription:
                      "?accessibilityDescriptionCameraPermissionEnableCameraButton",
                  background: BackgroundStyle(
                      strokeColor: ScanbotColor("?sbColorPrimary"),
                      fillColor: ScanbotColor("?sbColorPrimary"),
                      strokeWidth: 0.0),
                  foreground: ForegroundStyle(
                      iconVisible: false,
                      color: ScanbotColor("?sbColorOnPrimary"),
                      useShadow: false)),
              closeButton: ButtonConfiguration(
                  visible: true,
                  text: "?cameraPermissionCloseButton",
                  accessibilityDescription:
                      "?accessibilityDescriptionCameraPermissionCloseButton",
                  background: BackgroundStyle(
                      strokeColor: ScanbotColor("#00000000"),
                      fillColor: ScanbotColor("#00000000"),
                      strokeWidth: 0.0),
                  foreground: ForegroundStyle(
                      iconVisible: false,
                      color: ScanbotColor("?sbColorPrimary"),
                      useShadow: false)),
              enableCameraTitle: StyledText(
                  text: "?cameraPermissionEnableCameraTitle",
                  color: ScanbotColor("?sbColorOnSurface")),
              enableCameraExplanation: StyledText(
                  text: "?cameraPermissionEnableCameraExplanation",
                  color: ScanbotColor("?sbColorOnSurfaceVariant"))),
      topUserGuidance = topUserGuidance ??
          UserGuidanceConfiguration(
              title: StyledText(text: "?topUserGuidance")),
      scanStatusUserGuidance =
          scanStatusUserGuidance ?? CreditCardScanGuidanceConfiguration(),
      topBar = topBar ??
          TopBarConfiguration(
              title: StyledText(visible: true, text: "?topBarTitle"),
              cancelButton: ButtonConfiguration(
                  text: "?topBarCancelButton",
                  accessibilityDescription:
                      "?accessibilityDescriptionCancelButton",
                  background: BackgroundStyle(
                      strokeColor: ScanbotColor("#00000000"),
                      fillColor: ScanbotColor("#00000000"),
                      strokeWidth: 0.0),
                  foreground: ForegroundStyle(
                      color: ScanbotColor("?sbColorOnPrimary")))),
      topBarOpenIntroScreenButton = topBarOpenIntroScreenButton ??
          ScanbotIconButton(
              color: ScanbotColor("?sbColorOnPrimary"),
              accessibilityDescription:
                  "?accessibilityDescriptionOpenIntroScreenButton"),
      introScreen =
          introScreen ?? CreditCardScannerIntroScreenConfiguration(),
      actionBar = actionBar ??
          ActionBarConfiguration(
              flipCameraButton: RoundButton(
                  visible: false,
                  accessibilityDescription:
                      "?accessibilityDescriptionFlipCameraButton",
                  backgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  foregroundColor: ScanbotColor("?sbColorOnPrimary"),
                  activeBackgroundColor: ScanbotColor("?sbColorWarning"),
                  activeForegroundColor: ScanbotColor("#1C1B1F"))),
      viewFinder = viewFinder ??
          PermanentViewFinderConfiguration(
              style: FinderCorneredStyle(
                  strokeColor: ScanbotColor("?sbColorSurface"),
                  strokeWidth: 2.0),
              aspectRatio: AspectRatio(width: 1.586, height: 1.0),
              minimumInsets: ScanbotEdgeInsets(
                  top: 24.0, left: 24.0, bottom: 24.0, right: 24.0)),
      scannerConfiguration =
          scannerConfiguration ?? CreditCardScannerConfiguration(),
      scanningProgress =
          scanningProgress ?? CreditCardScanningProgressConfiguration(),
      successOverlay = successOverlay ?? ScanCompletionOverlay(),
      incompleteDataOverlay = incompleteDataOverlay ??
          ScanCompletionOverlay(
              message: StyledText(
                  text: "?completionOverlayIncompleteDataMessage")),
      sound = sound ?? Sound(),
      vibration = vibration ?? Vibration();