printESC method
Future<void>
printESC({
- String? deviceId,
- PrinterConnectionType? connectionType,
- required PrintThermalModel printThermalModel,
override
Implementation
@override
Future<void> printESC({
String? deviceId,
PrinterConnectionType? connectionType,
required PrintThermalModel printThermalModel,
}) async {
final data = printThermalModel.toJson();
if (deviceId != null) data["device_id"] = deviceId;
if (connectionType != null) data["connection_type"] = connectionType.value;
try {
await _channel.invokeMethod(PrinterMethod.printImageEsc.value, data);
} catch (e) {
print("Error printing ESC: $e");
}
}