Here is my code below.
Future<List<int>> getImage() async {
List<int> bytes = [];
CapabilityProfile profile = await CapabilityProfile.load();
final generator = Generator(PaperSize.mm80, profile);
final ByteData data = await rootBundle.load('assets/logo.png');
final buffer = data.buffer;
final image = base64.encode(Uint8List.view(buffer));
bytes += generator.image(image);
return bytes;
}
At
bytes += generator.image(image);
the error said that
Error: The argument type 'String' can't be assigned to the parameter type 'Image'.