BarcodeResult class

Represents the result of a barcode scan, including format, text, coordinates, and angle.

This class stores barcode details such as the decoded text, format, bounding box coordinates, rotation angle, and raw barcode bytes.

Example Usage:

BarcodeResult result = BarcodeResult.fromJson(jsonData);
print(result.text);

Constructors

BarcodeResult.new(String format, String text, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int angle, Uint8List barcodeBytes)
Constructs a BarcodeResult with the given properties.
BarcodeResult.fromJson(Map json)
Creates a BarcodeResult instance from a JSON object.
factory

Properties

angle int
Rotation angle of the barcode in degrees.
final
barcodeBytes Uint8List
Raw barcode data in bytes.
final
format String
Barcode format (e.g., "QR Code", "Code 128").
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Decoded text from the barcode.
final
x1 int
X-coordinate of the first corner point.
final
x2 int
X-coordinate of the second corner point.
final
x3 int
X-coordinate of the third corner point.
final
x4 int
X-coordinate of the fourth corner point.
final
y1 int
Y-coordinate of the first corner point.
final
y2 int
Y-coordinate of the second corner point.
final
y3 int
Y-coordinate of the third corner point.
final
y4 int
Y-coordinate of the fourth corner point.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this object to a JSON-compatible Map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited