setup method
Set up the label width, label height, print speed, print density, media sensor type, gap/black mark vertical distance, gap/black mark shift distance. @param width Width of the label in mm @param height Height of the label in mm @param speed Print Speed in inches/second 1.0 : 1.0 inch/second 1.5: 1.5 inches/second 2.0: 2.0 inches/second 3.0: 3.0 inches/second 4.0: 4.0 inches/second 6.0: 6.0 inches/second 8.0: 8.0 inches/second 10.0: 10.0 inches/second 13.0: 13.0 inches/second 14.0: 14.0 inches/second @param density Print Density in the range from 0 to 15 @sensor Media Sensor Type @sensorDistance Sensor Distance - Vertical gap height of the gap/black mark in mm @sensorOffset Sensor Offset - Shift distance of the gap/black mark in mm.
Implementation
Future<bool> setup(
{int width = 50,
int height = 50,
double speed = 1,
int density = 15,
TbSensor sensor = TbSensor.GAP,
int sensorDistance = 0,
int sensorOffset = 0}) async {
var params = {
"printerId": _printerId,
"printInfo": _printerInfo.toMap(),
"width": width,
"height": height,
"speed": speed,
"density": density,
"sensor": sensor.getValue(),
"sensorDistance": sensorDistance,
"sensorOffset": sensorOffset
};
final bool success = await _channel.invokeMethod("typeB-setup", params);
return success;
}