sendCommands static method
Future<PrinterResponseStatus>
sendCommands({
- required String portName,
- required String emulation,
- required PrintCommands printCommands,
Sends PrintCommands to the printer. Have to specify portName
and emulation
. Returns PrinterResponseStatus
Implementation
static Future<PrinterResponseStatus> sendCommands({
required String portName,
required String emulation,
required PrintCommands printCommands,
}) async {
dynamic result = await _channel.invokeMethod('print', {
'portName': portName,
'emulation': emulation,
'printCommands': printCommands.getCommands(),
});
return PrinterResponseStatus.fromMap(
Map<String, dynamic>.from(result),
);
}