QrPainter constructor

QrPainter({
  1. required String data,
  2. required QrOptions options,
})

Implementation

QrPainter({
  required this.data,
  required this.options,
}) {
  matrix = Encoder.encode(data, options.ecl).matrix!;

  var width = matrix.width ~/ 4;
  if (width % 2 != matrix.width % 2) {
    width++;
  }
  var height = matrix.height ~/ 4;
  if (height % 2 != matrix.height % 2) {
    height++;
  }
}