zxing_mobile
library
Functions
convertImage (CameraImage image )
→ Future <Uint8List >
Extracts the bytes the decoder should scan from a camera frame.
copyStringFromOwnedFfiPtr (Pointer <Char > text )
→ String ?
From an owned, UTF-8 encoded C-string (null-byte terminated) allocated in
native code, copy the string into the Dart VM Heap as a String a and then
immediately free the owned pointer.
copyUint8ListFromOwnedFfiPtr (Pointer <Uint8 > data , int length )
→ Uint8List ?
From an owned pointer allocated in native code, copy the data into the Dart
VM Heap as a Uint8List and then immediately free the owned ffi pointer.
getZxing ()
→ Zxing
pngFromBytes (Uint8List bytes , int width , int height )
→ Uint8List
Encodes a single-channel (grayscale) buffer as a PNG.
resizeToMaxSize (Image image , int ? maxSize )
→ Image
Scales image down so that neither side exceeds maxSize, preserving the
aspect ratio. Returns image untouched when maxSize is null or not
positive, or when the image already fits.
rgbBytes (Image image )
→ Uint8List
Returns image as a tightly packed 8-bit RGB buffer of
width * height * 3 bytes.
setZxingLogEnabled (bool enabled )
→ void
Enables or disables the logging of the library
tightlyPackedYPlaneFromCameraImage (CameraImage image )
→ Uint8List
Returns the luminance (Y) plane of image without its row padding.
zxingBarcodeFormatName (int format )
→ String
Returns a readable barcode format name
zxingEncodeBarcode ({required String contents , required EncodeParams params })
→ Encode
zxingProcessCameraImage (CameraImage image , DecodeParams params )
→ Future
zxingReadBarcode (Uint8List bytes , DecodeParams params )
→ Code
Reads barcode from Uint8List image bytes
zxingReadBarcodeImagePath (XFile path , DecodeParams params )
→ Future <Code >
Reads barcode from XFile image path
zxingReadBarcodeImagePathString (String path , DecodeParams params )
→ Future <Code >
Reads barcode from String image path
zxingReadBarcodeImageUrl (String url , DecodeParams params )
→ Future <Code >
Reads barcode from image url
zxingReadBarcodes (Uint8List bytes , DecodeParams params )
→ Codes
Reads barcodes from Uint8List image bytes
zxingReadBarcodesImagePath (XFile path , DecodeParams params )
→ Future <Codes >
Reads barcodes from XFile image path
zxingReadBarcodesImagePathString (String path , DecodeParams params )
→ Future <Codes >
Reads barcodes from String image path
zxingReadBarcodesImageUrl (String url , DecodeParams params )
→ Future <Codes >
Reads barcodes from image url
zxingStartCameraProcessing ()
→ Future <void >
Starts reading barcode from the camera
zxingStopCameraProcessing ()
→ void
Stops reading barcode from the camera
zxingVersion ()
→ String
Returns a version of the zxing library