Result constructor

Result(
  1. String text,
  2. Int8List? rawBytes,
  3. BarcodeFormat format, {
  4. List<ResultPoint>? points,
  5. int? numBits,
  6. DateTime? time,
})

Implementation

Result(this.text, this.rawBytes, this.format,
    {List<ResultPoint>? points, int? numBits, DateTime? time})
    : numBits = numBits ?? (rawBytes == null ? 0 : 8 * rawBytes.length),
      time = time ?? DateTime.now() {
  if (points != null) {
    resultPoints.addAll(points);
  }
}