David PHAM-VAN

Update dependency to barcode ^1.5.0

# Changelog
## 1.4.1
- Update dependency to barcode ^1.5.0
## 1.4.0
- Improve BarcodeWidget
... ...
... ... @@ -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);
... ...
... ... @@ -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:
... ...
... ... @@ -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'),
],
),
);
... ...