Showing
1 changed file
with
6 additions
and
1 deletions
@@ -369,7 +369,12 @@ class PrintingPlugin extends PrintingPlatform { | @@ -369,7 +369,12 @@ class PrintingPlugin extends PrintingPlatform { | ||
369 | // Convert the image to PNG | 369 | // Convert the image to PNG |
370 | final completer = Completer<void>(); | 370 | final completer = Completer<void>(); |
371 | final blobCompleter = Completer<web.Blob?>(); | 371 | final blobCompleter = Completer<web.Blob?>(); |
372 | - canvas.toBlob(blobCompleter.complete.toJS); | 372 | + canvas.toBlob( |
373 | + // ignore: unnecessary_lambdas | ||
374 | + (web.Blob? blob) { | ||
375 | + blobCompleter.complete(blob); | ||
376 | + }.toJS, | ||
377 | + ); | ||
373 | final blob = await blobCompleter.future; | 378 | final blob = await blobCompleter.future; |
374 | if (blob == null) { | 379 | if (blob == null) { |
375 | continue; | 380 | continue; |
-
Please register or login to post a comment