encodePng method
Encodes data with writer and renders it as a PNG drawn with this
style; see toPng. A QR code with a logo gets the logo's
BarcodeLogo.neededErrorCorrection unless the writer sets its own, as
in BarcodeView.
Throws BarcodeWriteException if data cannot be encoded.
Implementation
Future<Uint8List> encodePng(
BarcodeWriter writer,
String data, {
int? size,
int? moduleSize,
}) async =>
toPng(await _encode(writer, data), size: size, moduleSize: moduleSize);