Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2020-01-02 17:43:15 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bab53944eee603b5c46397d7efc264101daa9db2
bab53944
1 parent
c09ad49d
Update dependency to barcode ^1.5.0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
25 deletions
pdf/CHANGELOG.md
pdf/lib/widgets/barcode.dart
pdf/pubspec.yaml
pdf/test/widget_barcode_test.dart
test/golden/widgets-barcode.pdf
pdf/CHANGELOG.md
View file @
bab5394
# Changelog
## 1.4.1
-
Update dependency to barcode ^1.5.0
## 1.4.0
-
Improve BarcodeWidget
...
...
pdf/lib/widgets/barcode.dart
View file @
bab5394
...
...
@@ -197,6 +197,7 @@ class BarcodeWidget extends StatelessWidget {
fontItalic:
Font
.
courierOblique
(),
fontBoldItalic:
Font
.
courierBoldOblique
(),
lineSpacing:
1
,
fontSize:
height
!=
null
?
height
*
0.2
:
null
,
);
final
TextStyle
_textStyle
=
defaultstyle
.
merge
(
textStyle
);
...
...
pdf/pubspec.yaml
View file @
bab5394
...
...
@@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/pdf
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
1.4.
0
version
:
1.4.
1
environment
:
sdk
:
"
>=2.3.0
<3.0.0"
...
...
@@ -16,7 +16,7 @@ dependencies:
crypto
:
^2.0.6
archive
:
^2.0.10
qr
:
^1.2.0
barcode
:
^1.
4
.0
barcode
:
^1.
5
.0
dev_dependencies
:
test
:
...
...
pdf/test/widget_barcode_test.dart
View file @
bab5394
...
...
@@ -25,7 +25,7 @@ import 'package:test/test.dart';
Document
pdf
;
Widget
barcode
(
Barcode
barcode
,
String
data
)
{
Widget
barcode
(
Barcode
barcode
,
String
data
,
{
double
width
=
200
}
)
{
return
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
<
Widget
>[
...
...
@@ -37,21 +37,13 @@ Widget barcode(Barcode barcode, String data) {
),
Flexible
(
fit:
FlexFit
.
tight
,
child:
BarcodeWidget
(
barcode:
barcode
,
data:
data
,
width:
200
,
height:
80
,
margin:
const
EdgeInsets
.
symmetric
(
vertical:
20
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
3
),
decoration:
const
BoxDecoration
(
border:
BoxBorder
(
color:
PdfColors
.
blue
,
top:
true
,
bottom:
true
,
left:
true
,
right:
true
,
),
child:
Center
(
child:
BarcodeWidget
(
barcode:
barcode
,
data:
data
,
width:
width
,
height:
80
,
margin:
const
EdgeInsets
.
symmetric
(
vertical:
20
),
),
),
),
...
...
@@ -72,11 +64,14 @@ void main() {
barcode
(
Barcode
.
code39
(),
'CODE 39'
),
barcode
(
Barcode
.
code93
(),
'CODE 93'
),
barcode
(
Barcode
.
code128
(),
'Barcode 128'
),
barcode
(
Barcode
.
ean13
(),
'590123412345'
),
barcode
(
Barcode
.
ean8
(),
'9638507'
),
barcode
(
Barcode
.
isbn
(),
'978316148410'
),
barcode
(
Barcode
.
upcA
(),
'98765432109'
),
barcode
(
Barcode
.
upcE
(),
'06510000432'
),
barcode
(
Barcode
.
ean13
(),
'590123412345'
,
width:
150
),
barcode
(
Barcode
.
ean8
(),
'9638507'
,
width:
80
),
barcode
(
Barcode
.
isbn
(),
'978316148410'
,
width:
150
),
barcode
(
Barcode
.
upcA
(),
'98765432109'
,
width:
150
),
barcode
(
Barcode
.
upcE
(),
'06510000432'
,
width:
100
),
barcode
(
Barcode
.
ean2
(),
'44'
,
width:
40
),
barcode
(
Barcode
.
ean5
(),
'30897'
,
width:
60
),
barcode
(
Barcode
.
itf14
(),
'2578639587234'
),
],
),
);
...
...
test/golden/widgets-barcode.pdf
View file @
bab5394
No preview for this file type
Please
register
or
login
to post a comment