toBarcode method

Barcode toBarcode()

Implementation

Barcode toBarcode() {
  final corners = resultPoints
      .cast<ResultPoint>()
      .map((ResultPoint rp) => Offset(rp.x, rp.y))
      .toList();

  final rawBytes = this.rawBytes;
  return Barcode(
    rawValue: text,
    rawBytes: rawBytes != null ? Uint8List.fromList(rawBytes) : null,
    format: barcodeFormat,
    corners: corners,
  );
}