Commit 2aab7ac1 authored by andrey's avatar andrey

added optional delayMs param

parent faf24390
## [4.0.3]
- Added optional delay param to `disconnect` method
## [4.0.2]
- Fixed IP bug
......
......@@ -44,8 +44,12 @@ class NetworkPrinter {
}
}
void disconnect() {
/// [delayMs]: milliseconds to wait after destroying the socket
void disconnect({int delayMs}) async {
_socket.destroy();
if (delayMs != null) {
await Future.delayed(Duration(milliseconds: delayMs), () => null);
}
}
// ************************ Printer Commands ************************
......
name: esc_pos_printer
description: The library allows to print receipts using an ESC/POS thermal WiFi printer.
version: 4.0.2
version: 4.0.3
homepage: https://github.com/andrey-ushakov/esc_pos_printer
environment:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment