printImage static method

Future<void> printImage(
  1. Uint8List img
)

uint8List format image

Note: the resolution of an image should be within 2M, and the width should be set in accordance with the paper spec (58: 384 Pixel, 80: 576 Pixel). It cannot be shown if it exceeds the paper width.

Implementation

static Future<void> printImage(Uint8List img ) async {
  Map<String, dynamic> arguments = <String, dynamic>{};
  arguments.putIfAbsent("bitmap", () => img);
  await _channel.invokeMethod("PRINT_IMAGE", arguments);

}