Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
esc_pos_print_plus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
esc_pos_print_plus
Commits
2aab7ac1
Commit
2aab7ac1
authored
Nov 13, 2020
by
andrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added optional delayMs param
parent
faf24390
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
CHANGELOG.md
CHANGELOG.md
+4
-0
network_printer.dart
lib/src/network_printer.dart
+5
-1
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
CHANGELOG.md
View file @
2aab7ac1
## [4.0.3]
-
Added optional delay param to
`disconnect`
method
## [4.0.2]
## [4.0.2]
-
Fixed IP bug
-
Fixed IP bug
...
...
lib/src/network_printer.dart
View file @
2aab7ac1
...
@@ -44,8 +44,12 @@ class NetworkPrinter {
...
@@ -44,8 +44,12 @@ class NetworkPrinter {
}
}
}
}
void
disconnect
()
{
/// [delayMs]: milliseconds to wait after destroying the socket
void
disconnect
({
int
delayMs
})
async
{
_socket
.
destroy
();
_socket
.
destroy
();
if
(
delayMs
!=
null
)
{
await
Future
.
delayed
(
Duration
(
milliseconds:
delayMs
),
()
=>
null
);
}
}
}
// ************************ Printer Commands ************************
// ************************ Printer Commands ************************
...
...
pubspec.yaml
View file @
2aab7ac1
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.
2
version
:
4.0.
3
homepage
:
https://github.com/andrey-ushakov/esc_pos_printer
homepage
:
https://github.com/andrey-ushakov/esc_pos_printer
environment
:
environment
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment