Implementation
CheckScannerScreenConfiguration({
this.version = "1.0",
this.screen = "CheckScanner",
CheckScannerScreenTextLocalization? localization,
Palette? palette,
ScanbotColor? backgroundColor,
CameraConfiguration? cameraConfiguration,
CameraPermissionScreen? cameraPermission,
UserGuidanceConfiguration? topUserGuidance,
CheckScannerGuidanceConfiguration? scanStatusUserGuidance,
TopBarConfiguration? topBar,
ScanbotIconButton? topBarOpenIntroScreenButton,
CheckScannerIntroScreenConfiguration? introScreen,
ActionBarConfiguration? actionBar,
PermanentViewFinderConfiguration? viewFinder,
CheckScannerConfiguration? scannerConfiguration,
this.captureHighResolutionImage = false,
this.exampleOverlayVisible = true,
CheckScanningProgressConfiguration? scanningProgress,
this.noCheckFoundTimeout = 5000,
this.accumulationTimeout = 3000,
ScanCompletionOverlay? successOverlay,
ScanbotAlertDialog? noCheckDetectedAlertDialog,
ScanbotAlertDialog? imageNotGoodAlertDialog,
Sound? sound,
Vibration? vibration,
this.keepScreenOn = true,
}) : localization = localization ?? CheckScannerScreenTextLocalization(),
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 ?? CheckScannerGuidanceConfiguration(),
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 ?? CheckScannerIntroScreenConfiguration(),
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: 2.14, height: 1.0),
minimumInsets: ScanbotEdgeInsets(
top: 24.0, left: 24.0, bottom: 24.0, right: 24.0)),
scannerConfiguration =
scannerConfiguration ?? CheckScannerConfiguration(),
scanningProgress =
scanningProgress ?? CheckScanningProgressConfiguration(),
successOverlay = successOverlay ?? ScanCompletionOverlay(),
noCheckDetectedAlertDialog = noCheckDetectedAlertDialog ??
ScanbotAlertDialog(
title: StyledText(
text: "?checkNoCheckDetectedAlertTitle",
color: ScanbotColor("?sbColorOnSurface")),
subtitle: StyledText(
text: "?checkNoCheckDetectedAlertSubtitle",
color: ScanbotColor("?sbColorOnSurfaceVariant")),
sheetColor: ScanbotColor("?sbColorSurface"),
modalOverlayColor: ScanbotColor("?sbColorModalOverlay"),
dividerColor: ScanbotColor("?sbColorOutline"),
okButton: ButtonConfiguration(
visible: true,
text: "?checkAlertRetryButton",
accessibilityDescription:
"?accessibilityDescriptionRetryButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("?sbColorPrimary"),
fillColor: ScanbotColor("?sbColorPrimary"),
strokeWidth: 1.0),
foreground: ForegroundStyle(
iconVisible: true,
color: ScanbotColor("?sbColorOnPrimary"),
useShadow: false)),
cancelButton: ButtonConfiguration(
visible: true,
text: "?checkAlertCloseScannerButton",
accessibilityDescription:
"?accessibilityDescriptionCloseScannerButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 1.0),
foreground: ForegroundStyle(
iconVisible: false,
color: ScanbotColor("?sbColorPrimary"),
useShadow: false))),
imageNotGoodAlertDialog = imageNotGoodAlertDialog ??
ScanbotAlertDialog(
title: StyledText(
text: "?checkImageNotGoodAlertTitle",
color: ScanbotColor("?sbColorOnSurface")),
subtitle: StyledText(
text: "?checkImageNotGoodAlertSubtitle",
color: ScanbotColor("?sbColorOnSurfaceVariant")),
sheetColor: ScanbotColor("?sbColorSurface"),
modalOverlayColor: ScanbotColor("?sbColorModalOverlay"),
dividerColor: ScanbotColor("?sbColorOutline"),
okButton: ButtonConfiguration(
visible: true,
text: "?checkAlertRetryButton",
accessibilityDescription:
"?accessibilityDescriptionRetryButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("?sbColorPrimary"),
fillColor: ScanbotColor("?sbColorPrimary"),
strokeWidth: 1.0),
foreground: ForegroundStyle(
iconVisible: true,
color: ScanbotColor("?sbColorOnPrimary"),
useShadow: false)),
cancelButton: ButtonConfiguration(
visible: true,
text: "?checkAlertCloseScannerButton",
accessibilityDescription:
"?accessibilityDescriptionCloseScannerButton",
background: BackgroundStyle(
strokeColor: ScanbotColor("#00000000"),
fillColor: ScanbotColor("#00000000"),
strokeWidth: 1.0),
foreground: ForegroundStyle(
iconVisible: false,
color: ScanbotColor("?sbColorPrimary"),
useShadow: false))),
sound = sound ?? Sound(),
vibration = vibration ?? Vibration();