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
6fb75107
Commit
6fb75107
authored
Jan 16, 2020
by
Andrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring
parent
b8e3d1bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
main.dart
example/blue/lib/main.dart
+1
-1
ticket.dart
lib/src/ticket.dart
+5
-3
No files found.
example/blue/lib/main.dart
View file @
6fb75107
...
...
@@ -60,7 +60,7 @@ class _MyHomePageState extends State<MyHomePage> {
void
_testPrint
(
PrinterBluetooth
printer
)
async
{
printerManager
.
selectPrinter
(
printer
);
Ticket
ticket
=
Ticket
(
PaperSize
.
mm58
);
final
Ticket
ticket
=
Ticket
(
PaperSize
.
mm58
);
ticket
.
text
(
'Regular: aA bB cC dD eE fF gG hH iI jJ kK lL mM nN oO pP qQ rR sS tT uU vV wW xX yY zZ'
);
...
...
lib/src/ticket.dart
View file @
6fb75107
...
...
@@ -18,11 +18,13 @@ import 'pos_column.dart';
import
'pos_styles.dart'
;
class
Ticket
{
Ticket
(
this
.
_paperSize
);
Ticket
(
this
.
_paperSize
)
{
reset
();
}
List
<
int
>
bytes
=
[];
PosCodeTable
_codeTable
;
PaperSize
_paperSize
;
final
PaperSize
_paperSize
;
/// Set global code table which will be used instead of the default printer's code table
void
setGlobalCodeTable
(
PosCodeTable
codeTable
)
{
...
...
@@ -35,7 +37,7 @@ class Ticket {
}
double
_colIndToPosition
(
int
colInd
)
{
int
width
=
PaperSize
.
width
(
_paperSize
);
final
int
width
=
PaperSize
.
width
(
_paperSize
);
return
colInd
==
0
?
0
:
(
width
*
colInd
/
11
-
1
);
}
...
...
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