barcode_capture.dart
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// @docImport 'package:mobile_scanner/src/mobile_scanner_controller.dart';
library;
import 'dart:typed_data';
import 'dart:ui';
import 'package:mobile_scanner/src/objects/barcode.dart';
/// This class represents a scanned barcode.
class BarcodeCapture {
/// Create a new [BarcodeCapture] instance.
const BarcodeCapture({
this.barcodes = const <Barcode>[],
this.image,
this.raw,
this.size = Size.zero,
});
/// The list of scanned barcodes.
final List<Barcode> barcodes;
/// The input image of the barcode capture.
///
/// This is the image that was used to detect the available [barcodes],
/// not the image from a specific barcode.
///
/// This is always null if [MobileScannerController.returnImage] is false.
final Uint8List? image;
/// The raw data of the barcode scan.
///
/// This is the data that was used to detect the available [barcodes], the input [image] and the [size].
final Object? raw;
/// The size of the input [image].
///
/// If [image] is null, this will be [Size.zero].
final Size size;
}