Commit faf24390 authored by andrey's avatar andrey

Fixed IP bug

parent 5ef85c91
## [4.0.2]
- Fixed IP bug
## [4.0.1] ## [4.0.1]
- `NetworkPrinter`: added `paperSize`, `profile`, `host`, `port` getters - `NetworkPrinter`: added `paperSize`, `profile`, `host`, `port` getters
......
...@@ -36,7 +36,7 @@ class NetworkPrinter { ...@@ -36,7 +36,7 @@ class NetworkPrinter {
_host = host; _host = host;
_port = port; _port = port;
try { try {
_socket = await Socket.connect('192.168.0.101', port, timeout: timeout); _socket = await Socket.connect(host, port, timeout: timeout);
_socket.add(_generator.reset()); _socket.add(_generator.reset());
return Future<PosPrintResult>.value(PosPrintResult.success); return Future<PosPrintResult>.value(PosPrintResult.success);
} catch (e) { } catch (e) {
......
name: esc_pos_printer name: esc_pos_printer
description: The library allows to print receipts using an ESC/POS thermal WiFi printer. description: The library allows to print receipts using an ESC/POS thermal WiFi printer.
version: 4.0.1 version: 4.0.2
homepage: https://github.com/andrey-ushakov/esc_pos_printer homepage: https://github.com/andrey-ushakov/esc_pos_printer
environment: 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