BarcodeScannerConfiguration constructor

BarcodeScannerConfiguration({
  1. String version = "1.0",
  2. String screen = "BarcodeScanner",
  3. Palette? palette,
  4. BarcodeTextLocalization? localization,
  5. ScanbotColor? backgroundColor,
  6. TopBarConfiguration? topBar,
  7. ActionBarConfiguration? actionBar,
  8. ViewFinderConfiguration? viewFinder,
  9. UserGuidanceConfiguration? userGuidance,
  10. CameraPermissionScreen? cameraPermission,
  11. CameraConfiguration? cameraConfiguration,
  12. BarcodeRecognizerConfiguration? recognizerConfiguration,
  13. BarcodeUseCase? useCase,
  14. Sound? sound,
  15. Vibration? vibration,
  16. Timeouts? timeouts,
})

Implementation

BarcodeScannerConfiguration({
  this.version = "1.0",
  this.screen = "BarcodeScanner",
  Palette? palette,
  BarcodeTextLocalization? localization,
  ScanbotColor? backgroundColor,
  TopBarConfiguration? topBar,
  ActionBarConfiguration? actionBar,
  ViewFinderConfiguration? viewFinder,
  UserGuidanceConfiguration? userGuidance,
  CameraPermissionScreen? cameraPermission,
  CameraConfiguration? cameraConfiguration,
  BarcodeRecognizerConfiguration? recognizerConfiguration,
  BarcodeUseCase? useCase,
  Sound? sound,
  Vibration? vibration,
  Timeouts? timeouts,
})  : palette = palette ??
          Palette(
              sbColorPrimary: ScanbotColor("#C8193C"),
              sbColorPrimaryDisabled: ScanbotColor("#F5F5F5"),
              sbColorNegative: ScanbotColor("#FF3737"),
              sbColorPositive: ScanbotColor("#4EFFB4"),
              sbColorWarning: ScanbotColor("#FFCE5C"),
              sbColorSecondary: ScanbotColor("#FFEDEE"),
              sbColorSecondaryDisabled: ScanbotColor("#F5F5F5"),
              sbColorOnPrimary: ScanbotColor("#FFFFFF"),
              sbColorOnSecondary: ScanbotColor("#C8193C"),
              sbColorSurface: ScanbotColor("#FFFFFF"),
              sbColorOutline: ScanbotColor("#EFEFEF"),
              sbColorOnSurfaceVariant: ScanbotColor("#707070"),
              sbColorOnSurface: ScanbotColor("#000000"),
              sbColorSurfaceLow: ScanbotColor("#00000026"),
              sbColorSurfaceHigh: ScanbotColor("#0000007A"),
              sbColorModalOverlay: ScanbotColor("#000000A3")),
      localization = localization ?? BarcodeTextLocalization(),
      backgroundColor = backgroundColor ?? ScanbotColor("?sbColorSurfaceLow"),
      topBar = topBar ??
          TopBarConfiguration(
              title: StyledText(
                  text: "?topBarTitle",
                  color: ScanbotColor("?sbColorOnPrimary")),
              mode: TopBarMode.SOLID,
              statusBarMode: StatusBarMode.LIGHT,
              backgroundColor: ScanbotColor("?sbColorPrimary"),
              cancelButton: ButtonConfiguration(
                  visible: true,
                  text: "?topBarCancelButton",
                  background: BackgroundStyle(
                      strokeColor: ScanbotColor("#00000000"),
                      fillColor: ScanbotColor("#00000000"),
                      strokeWidth: 0.0),
                  foreground: ForegroundStyle(
                      iconVisible: true,
                      color: ScanbotColor("?sbColorOnPrimary"),
                      useShadow: false))),
      actionBar = actionBar ??
          ActionBarConfiguration(
              flashButton: RoundButton(
                  visible: true,
                  backgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  foregroundColor: ScanbotColor("?sbColorOnPrimary"),
                  activeBackgroundColor: ScanbotColor("?sbColorWarning"),
                  activeForegroundColor: ScanbotColor("#1C1B1F")),
              zoomButton: RoundButton(
                  visible: true,
                  backgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  foregroundColor: ScanbotColor("?sbColorOnPrimary"),
                  activeBackgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  activeForegroundColor: ScanbotColor("?sbColorOnPrimary")),
              flipCameraButton: RoundButton(
                  visible: true,
                  backgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  foregroundColor: ScanbotColor("?sbColorOnPrimary"),
                  activeBackgroundColor: ScanbotColor("?sbColorSurfaceHigh"),
                  activeForegroundColor: ScanbotColor("?sbColorOnPrimary"))),
      viewFinder = viewFinder ??
          ViewFinderConfiguration(
              visible: true,
              style: FinderCorneredStyle(
                  strokeColor: ScanbotColor("?sbColorSurface"),
                  strokeWidth: 2.0,
                  cornerRadius: 10.0),
              overlayColor: ScanbotColor("?sbColorSurfaceLow"),
              aspectRatio: AspectRatio(width: 1.0, height: 1.0)),
      userGuidance = userGuidance ??
          UserGuidanceConfiguration(
              visible: true,
              title: StyledText(
                  text: "?userGuidance",
                  color: ScanbotColor("?sbColorOnPrimary")),
              background: BackgroundStyle(
                  strokeColor: ScanbotColor("#00000000"),
                  fillColor: ScanbotColor("?sbColorSurfaceLow"),
                  strokeWidth: 0.0)),
      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",
                  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",
                  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"))),
      cameraConfiguration = cameraConfiguration ?? CameraConfiguration(),
      recognizerConfiguration =
          recognizerConfiguration ?? BarcodeRecognizerConfiguration(),
      useCase = useCase ?? SingleScanningMode(),
      sound = sound ??
          Sound(successBeepEnabled: true, soundType: SoundType.MODERN_BEEP),
      vibration = vibration ?? Vibration(enabled: true),
      timeouts =
          timeouts ?? Timeouts(autoCancelTimeout: 0, initialScanDelay: 0);