printLabel method
Future<void>
printLabel({
- String? deviceId,
- PrinterConnectionType? connectionType,
- required LabelModel labelModel,
override
Implementation
@override
Future<void> printLabel({
String? deviceId,
PrinterConnectionType? connectionType,
required LabelModel labelModel,
}) async {
final data = labelModel.toJson();
if (deviceId != null) data["device_id"] = deviceId;
if (connectionType != null) data["connection_type"] = connectionType.value;
await _channel.invokeMethod(PrinterMethod.printLabel.value, data);
}