Qrcode Scanner

QRCodeScanner widget

The QR-Code Scanner Widget provides a camera preview for scanning QR codes and returns the decoded data.

Test in Kitchen Sink (opens in a new tab)

Properties

PropertyTypeDescription
formatsAllowedarrayUse formatsAllowed to specify which formats needs to be scanned.
initialCamerastringInitialize either camera, back or front. back front
onInitializedactionExecute an action once the QRCodeScanner is initialized
onPermissionSetactionExecute an action with the status of camera permission. Get the status via event.data.status
onReceivedactionExecute an action when it scans and retrieved the data from QRCode. Get the data via event.data.data, format event.data.format and bytes event.data.rawBytes
stylesobjectSee properties

styles

PropertyTypeDescription
overlayColorinteger or stringThe overlay color of the QR code scanner widget
cutOutBorderColorinteger or stringThe border color of the cutOut area of the QRCodeScanner widget
overlayMarginintegerThe margin of the overlay of the QRCodeScanner widget
cutOutBorderWidthintegerThickness of the cutOut area border.
cutOutBorderLengthintegerLength of the cutOut area border.
cutOutBorderRadiusintegerThe border radius of the cutOut area widget.
cutOutWidthintegerThe width of the cutOut area widget.
cutOutHeightintegerThe height of the cutOut area widget.

Methods

FunctionArgsDescription
flipCamera()It flips the camera from back to front or front to back
toggleFlash()It turns the flash light ON/OFF
pauseCamera()It pauses the camera in the QRCodeScanner widget
resumeCamera()It resumes the camera in the QRCodeScanner widget

Box Styles (Inherited)

This widget also inherits these styles

box

Base Styles (Inherited)

This widget also inherits these styles

base