convertResults function
Converts a list of barcode scan results from JSON format to BarcodeResult objects.
This function is used to transform the decoded barcode results into a list of BarcodeResult instances.
Example Usage:
List<BarcodeResult> results = convertResults(jsonData);
print(results[0].text);
Implementation
List<BarcodeResult> convertResults(List<Map<dynamic, dynamic>> jsonResults) {
return jsonResults.map((data) => BarcodeResult.fromJson(data)).toList();
}