ScanResult class

Model class representing a barcode scan result

Constructors

ScanResult({required String data, String? type, required DateTime timestamp, String? source})
const
ScanResult.fromMap(Map<String, dynamic> map)
Create ScanResult from a map (from native platform)
factory

Properties

data String
The scanned barcode data
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String?
Source of the scan (e.g., 'barcode_scan', 'manual')
final
timestamp DateTime
Timestamp when the scan occurred
final
type String?
The barcode type (e.g., QR Code, EAN-13, Code 128)
final

Methods

copyWith({String? data, String? type, DateTime? timestamp, String? source}) ScanResult
Returns a copy of this ScanResult with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Convert to map
toString() String
A string representation of this object.
override

Operators

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