esc_pos_printer icon indicating copy to clipboard operation
esc_pos_printer copied to clipboard

No print if add image

Open 3rdfloordesign opened this issue 1 year ago • 1 comments

I have this issue when try to start printing image A value of type 'Image?' can't be assigned to a variable of type 'Image'. This is my piece of code, someone can help me! Please Schermata 2022-07-28 alle 13 07 59 .

3rdfloordesign avatar Jul 28 '22 11:07 3rdfloordesign

Hello @3rdfloordesign, the reason for the error described in the image is that it may be null. add the null safety treatment

final Image? image = decodeImage(bytes); or final Image image = decodeImage(bytes)!;

RyanFreitasG4 avatar Nov 16 '22 19:11 RyanFreitasG4