diff --git a/lib/src/network_printer.dart b/lib/src/network_printer.dart index abec81f..7b102dd 100644 --- a/lib/src/network_printer.dart +++ b/lib/src/network_printer.dart @@ -44,6 +44,11 @@ class NetworkPrinter { } } + /// Flush all buffered print commands + Future flush() async { + await _socket.flush(); + } + /// [delayMs]: milliseconds to wait after destroying the socket void disconnect({int? delayMs}) async { _socket.destroy();