Optional
source: DeepPartial<BarcodeScannerConfiguration>Configuration of the action bar.
new ActionBarConfiguration({
"flashButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorWarning",
"activeForegroundColor": "#1C1B1F"
}),
"zoomButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorSurfaceHigh",
"activeForegroundColor": "?sbColorOnPrimary"
}),
"flipCameraButton": new RoundButton({
"visible": true,
"backgroundColor": "?sbColorSurfaceHigh",
"foregroundColor": "?sbColorOnPrimary",
"activeBackgroundColor": "?sbColorSurfaceHigh",
"activeForegroundColor": "?sbColorOnPrimary"
})
});
Color of the screen's background.
"?sbColorSurfaceLow";
Configuration of the camera behavior.
new CameraConfiguration({});
Configuration of the dialog for requesting camera permissions.
new CameraPermissionScreen({
"background": "?sbColorSurface",
"iconBackground": "?sbColorOutline",
"icon": new IconStyle({
"visible": true,
"color": "?sbColorOnSurface"
}),
"closeButton": new ButtonConfiguration({
"visible": true,
"text": "?cameraPermissionCloseButton",
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "#00000000",
"strokeWidth": 0.0
}),
"foreground": new ForegroundStyle({
"iconVisible": false,
"color": "?sbColorPrimary",
"useShadow": false
})
}),
"enableCameraTitle": new StyledText({
"text": "?cameraPermissionEnableCameraTitle",
"color": "?sbColorOnSurface"
}),
"enableCameraExplanation": new StyledText({
"text": "?cameraPermissionEnableCameraExplanation",
"color": "?sbColorOnSurfaceVariant"
})
});
Configuration of the all strings for barcode scanner.
new BarcodeTextLocalization({});
Define the screen's base color values from which other colors are derived.
new Palette({
"sbColorPrimary": "#C8193C",
"sbColorPrimaryDisabled": "#F5F5F5",
"sbColorNegative": "#FF3737",
"sbColorPositive": "#4EFFB4",
"sbColorWarning": "#FFCE5C",
"sbColorSecondary": "#FFEDEE",
"sbColorSecondaryDisabled": "#F5F5F5",
"sbColorOnPrimary": "#FFFFFF",
"sbColorOnSecondary": "#C8193C",
"sbColorSurface": "#FFFFFF",
"sbColorOutline": "#EFEFEF",
"sbColorOnSurfaceVariant": "#707070",
"sbColorOnSurface": "#000000",
"sbColorSurfaceLow": "#00000026",
"sbColorSurfaceHigh": "#0000007A",
"sbColorModalOverlay": "#000000A3"
});
Configuration of the scanning behavior.
new BarcodeRecognizerConfiguration({});
The configuration object should be applied for this screen.
"BarcodeScanner";
Configuration of the scan confirmation sound.
new Sound({
"successBeepEnabled": true,
"soundType": "MODERN_BEEP"
});
Configuration of timeouts.
new Timeouts({
"autoCancelTimeout": 0,
"initialScanDelay": 0
});
Configuration of the top bar.
new TopBarConfiguration({
"title": new StyledText({
"text": "?topBarTitle",
"color": "?sbColorOnPrimary"
}),
"mode": "SOLID",
"backgroundColor": "?sbColorPrimary",
"cancelButton": new ButtonConfiguration({
"visible": true,
"text": "?topBarCancelButton",
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "#00000000",
"strokeWidth": 0.0
}),
"foreground": new ForegroundStyle({
"iconVisible": true,
"color": "?sbColorOnPrimary",
"useShadow": false
})
})
});
Configuration of the barcode scanner screen's behavior.
new SingleScanningMode({});
Configuration of the text hint guiding users to move the view finder over a barcode.
new UserGuidanceConfiguration({
"visible": true,
"title": new StyledText({
"text": "?userGuidance",
"color": "?sbColorOnPrimary"
}),
"background": new BackgroundStyle({
"strokeColor": "#00000000",
"fillColor": "?sbColorSurfaceLow",
"strokeWidth": 0.0
})
});
Version number of the configuration object.
"1.0";
Configuration of the scan scan confirmation vibration.
new Vibration({
"enabled": true
});
Configuration of the view finder.
new ViewFinderConfiguration({
"visible": true,
"style": new FinderCorneredStyle({
"strokeColor": "?sbColorSurface",
"strokeWidth": 2.0,
"cornerRadius": 10.0
}),
"overlayColor": "?sbColorSurfaceLow",
"aspectRatio": new AspectRatio({
"width": 1.0,
"height": 1.0
})
});
Generated using TypeDoc
Configuration of the barcode scanner screen.