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
f8ddcfa7
Commit
f8ddcfa7
authored
Jun 12, 2019
by
Andrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor
parent
8d9019c5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
23 deletions
+22
-23
esc_pos_printer.dart
lib/esc_pos_printer.dart
+1
-1
enums.dart
lib/src/enums.dart
+19
-19
esc_pos_printer_test.dart
test/esc_pos_printer_test.dart
+2
-3
No files found.
lib/esc_pos_printer.dart
View file @
f8ddcfa7
...
...
@@ -6,5 +6,5 @@
*/
library
esc_pos_printer
;
export
'./src/printer.dart'
;
export
'./src/enums.dart'
;
export
'./src/printer.dart'
;
lib/src/enums.dart
View file @
f8ddcfa7
...
...
@@ -3,31 +3,31 @@ enum PosCutMode { full, partial }
enum
PosFontType
{
fontA
,
fontB
}
class
PosTextSize
{
final
int
value
;
const
PosTextSize
.
_internal
(
this
.
value
);
static
const
size1
=
const
PosTextSize
.
_internal
(
1
);
static
const
size2
=
const
PosTextSize
.
_internal
(
2
);
static
const
size3
=
const
PosTextSize
.
_internal
(
3
);
static
const
size4
=
const
PosTextSize
.
_internal
(
4
);
static
const
size5
=
const
PosTextSize
.
_internal
(
5
);
static
const
size6
=
const
PosTextSize
.
_internal
(
6
);
static
const
size7
=
const
PosTextSize
.
_internal
(
7
);
static
const
size8
=
const
PosTextSize
.
_internal
(
8
);
final
int
value
;
static
const
size1
=
PosTextSize
.
_internal
(
1
);
static
const
size2
=
PosTextSize
.
_internal
(
2
);
static
const
size3
=
PosTextSize
.
_internal
(
3
);
static
const
size4
=
PosTextSize
.
_internal
(
4
);
static
const
size5
=
PosTextSize
.
_internal
(
5
);
static
const
size6
=
PosTextSize
.
_internal
(
6
);
static
const
size7
=
PosTextSize
.
_internal
(
7
);
static
const
size8
=
PosTextSize
.
_internal
(
8
);
static
int
decSize
(
PosTextSize
height
,
PosTextSize
width
)
=>
16
*
(
width
.
value
-
1
)
+
(
height
.
value
-
1
);
}
class
PosBeepDuration
{
final
int
value
;
const
PosBeepDuration
.
_internal
(
this
.
value
);
static
const
beep50ms
=
const
PosBeepDuration
.
_internal
(
1
);
static
const
beep100ms
=
const
PosBeepDuration
.
_internal
(
2
);
static
const
beep150ms
=
const
PosBeepDuration
.
_internal
(
3
);
static
const
beep200ms
=
const
PosBeepDuration
.
_internal
(
4
);
static
const
beep250ms
=
const
PosBeepDuration
.
_internal
(
5
);
static
const
beep300ms
=
const
PosBeepDuration
.
_internal
(
6
);
static
const
beep350ms
=
const
PosBeepDuration
.
_internal
(
7
);
static
const
beep400ms
=
const
PosBeepDuration
.
_internal
(
8
);
static
const
beep450ms
=
const
PosBeepDuration
.
_internal
(
9
);
final
int
value
;
static
const
beep50ms
=
PosBeepDuration
.
_internal
(
1
);
static
const
beep100ms
=
PosBeepDuration
.
_internal
(
2
);
static
const
beep150ms
=
PosBeepDuration
.
_internal
(
3
);
static
const
beep200ms
=
PosBeepDuration
.
_internal
(
4
);
static
const
beep250ms
=
PosBeepDuration
.
_internal
(
5
);
static
const
beep300ms
=
PosBeepDuration
.
_internal
(
6
);
static
const
beep350ms
=
PosBeepDuration
.
_internal
(
7
);
static
const
beep400ms
=
PosBeepDuration
.
_internal
(
8
);
static
const
beep450ms
=
PosBeepDuration
.
_internal
(
9
);
}
test/esc_pos_printer_test.dart
View file @
f8ddcfa7
import
'package:flutter_test/flutter_test.dart'
;
import
'package:esc_pos_printer/esc_pos_printer.dart'
;
// import 'package:flutter_test/flutter_test.dart';
// import 'package:esc_pos_printer/esc_pos_printer.dart';
void
main
(
)
{
// test('adds one to input values', () {
...
...
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