finish method
Finish encoding a PNG, and return the resulting bytes.
Call this method to finalize the encoding, after all addFrame calls.
Implementation
Uint8List? finish() {
Uint8List? bytes;
if (output == null) {
return bytes;
}
_writeChunk(output!, 'IEND', []);
sequenceNumber = 0;
bytes = output!.getBytes();
output = null;
return bytes;
}