QRCodeGenerate.fromData constructor

QRCodeGenerate.fromData({
  1. required String data,
  2. required int errorCorrectLevel,
})

Implementation

factory QRCodeGenerate.fromData({
  required String data,
  required int errorCorrectLevel,
}) {
  final typeNumber = _calculateTypeNumberFromData(
    errorCorrectLevel,
    [QrByte(data)],
  );
  return QRCodeGenerate(typeNumber, errorCorrectLevel)..addData(data);
}