flutter_animated_barcode_scanner library
Classes
- AnimatedBarcodeFinder
- A widget that displays a barcode finder with an animated border and a scanning line.
- BarcodeProcessor
- Handles processing barcodes effectively. cameraController : is used to get some required information to process an image. onBarcodesFound : callback when some BarcodeX are found. onFailedToProcessBarcode : callback when an error occurs. inputImageFormat : if null, default settings will be used, brga88888 on iOS and NV21 on Android. On some Android devices, brga8888 is used.
- BarcodeScannerPreview
- NOTE:
- BarcodeScannerPreviewWrapper
- The main widget of this package. This is a ready-to-use widget to show a barcode scanner.
- BarcodeX
- Data model for a barcode.
- BasicBarcodeRectangle
- Draw a rectangle outside of a barcode. cornerPoints : corner points of the barcode on the image. imageSize : size/resolution of the image, not the widget size. color : color of rectangle. strokeWidth : stroke width of Paint to draw.
- CameraPreviewWrapper
-
Wrapper of
CameraPreviewto show on screen easier. child : SeeCameraPreview.child. onCameraIsReady onCameraIsStreaming originalPreferredOrientations : for the most popular UX of barcode scanner in every mobile app is in portrait mode. So this widget will force the app to portrait mode then re-apply the original orientation mode list of the main app. cameraControllerBuilder : to build theCameraController.
Enums
- BarcodeScannerPreviewMode
- Determines how the BarcodeScannerPreview is displayed within the BarcodeScannerPreviewWrapper.
Extensions
- CameraImageX on CameraImage
-
Some extension methods when handling
CameraImage. - CameraInputImageFormatConverter on InputImageFormat
-
A class that provides utility functions for converting between different
image format enums from the
cameraandgoogle_mlkit_commonspackages. Extension to convert anInputImageFormatto anImageFormatGroup. - ImageFormatGroupFromString on String
-
Extension to convert a String to an
ImageFormatGroup. - MLKitInputImageFormatConverter on ImageFormatGroup
-
Extension to convert an
ImageFormatGroupto anInputImageFormat.
Properties
-
kCameraPreviewRouteObserver
→ RouteObserver<
ModalRoute> -
kCameraPreviewRouteObserver : It is required to register this observer to let the camera preview widget know when the route changes then it will stop/start the camera for reducing the camera resource usage.
final
Typedefs
-
BarcodesWidgetBuilder
= Widget Function(BuildContext context, List<
BarcodeX> barcodes) -
Build barcode rectangles.
context: BuildContext of parent widget.barcodes: list of found barcodes. -
CameraControllerBuilder
= Future<
CameraController> Function() -
Function to build a
CameraController. -
OnBarcodesFound
= void Function(List<
BarcodeX> barcodes) -
Callback when some barcodes are found.
barcodes: list of found barcodes. - OnCameraIsReady = void Function(CameraController controller)
-
Callback when the camera is initialized.
controller: theCameraControlleris ready to use. - OnCameraIsStreaming = void Function(CameraImage image)
-
Callback when the camera is streaming images.
image: raw image (frame) from the camera. - OnFailedToDoSomething = void Function(Object? e, StackTrace? s)
-
When any error occurs.
e: error object.s: stack trace of this error. - OnFailedToProcessBarcode = void Function(dynamic image, Object? e, StackTrace? s)
-
When any error occurs.
image: