David PHAM-VAN

Fix some linting issues

@@ -127,9 +127,6 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin { @@ -127,9 +127,6 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
127 final bytes = await build(pageFormat); 127 final bytes = await build(pageFormat);
128 128
129 final appDocDir = await getApplicationDocumentsDirectory(); 129 final appDocDir = await getApplicationDocumentsDirectory();
130 - if (appDocDir == null) {  
131 - return;  
132 - }  
133 final appDocPath = appDocDir.path; 130 final appDocPath = appDocDir.path;
134 final file = File(appDocPath + '/' + 'document.pdf'); 131 final file = File(appDocPath + '/' + 'document.pdf');
135 print('Save as file ${file.path} ...'); 132 print('Save as file ${file.path} ...');
1 # Changelog 1 # Changelog
2 2
  3 +## 3.0.2
  4 +
  5 +- Fix some linting issues
  6 +
3 ## 3.0.1 7 ## 3.0.1
4 8
5 - Improve internal null-safety 9 - Improve internal null-safety
@@ -19,4 +19,4 @@ import 'package:archive/archive.dart'; @@ -19,4 +19,4 @@ import 'package:archive/archive.dart';
19 import 'package:pdf/pdf.dart'; 19 import 'package:pdf/pdf.dart';
20 20
21 /// Zip compression function 21 /// Zip compression function
22 -DeflateCallback defaultDeflate = ZLibEncoder().encode; 22 +DeflateCallback defaultDeflate = const ZLibEncoder().encode;
@@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl @@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf 4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
5 repository: https://github.com/DavBfr/dart_pdf 5 repository: https://github.com/DavBfr/dart_pdf
6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
7 -version: 3.0.1 7 +version: 3.0.2
8 8
9 environment: 9 environment:
10 sdk: ">=2.12.0-0 <3.0.0" 10 sdk: ">=2.12.0-0 <3.0.0"
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## 5.0.2 3 ## 5.0.2
4 4
5 - Fix iOS/macOS release build not working 5 - Fix iOS/macOS release build not working
  6 +- Fix some linting issues
6 7
7 ## 5.0.1 8 ## 5.0.1
8 9
@@ -390,9 +390,9 @@ class _PdfPreviewState extends State<PdfPreview> { @@ -390,9 +390,9 @@ class _PdfPreviewState extends State<PdfPreview> {
390 final key = keys[index]; 390 final key = keys[index];
391 final val = _pageFormats[key]; 391 final val = _pageFormats[key];
392 return DropdownMenuItem<PdfPageFormat>( 392 return DropdownMenuItem<PdfPageFormat>(
  393 + value: val,
393 child: Text(key, 394 child: Text(key,
394 style: TextStyle(color: theme.accentIconTheme.color)), 395 style: TextStyle(color: theme.accentIconTheme.color)),
395 - value: val,  
396 ); 396 );
397 }, 397 },
398 ), 398 ),
@@ -418,11 +418,6 @@ class _PdfPreviewState extends State<PdfPreview> { @@ -418,11 +418,6 @@ class _PdfPreviewState extends State<PdfPreview> {
418 color: disabledColor, 418 color: disabledColor,
419 selectedBorderColor: color, 419 selectedBorderColor: color,
420 selectedColor: color, 420 selectedColor: color,
421 - children: <Widget>[  
422 - Transform.rotate(  
423 - angle: -pi / 2, child: const Icon(Icons.note_outlined)),  
424 - const Icon(Icons.note_outlined),  
425 - ],  
426 onPressed: (int index) { 421 onPressed: (int index) {
427 setState(() { 422 setState(() {
428 horizontal = index == 1; 423 horizontal = index == 1;
@@ -430,6 +425,11 @@ class _PdfPreviewState extends State<PdfPreview> { @@ -430,6 +425,11 @@ class _PdfPreviewState extends State<PdfPreview> {
430 }); 425 });
431 }, 426 },
432 isSelected: <bool>[horizontal == false, horizontal == true], 427 isSelected: <bool>[horizontal == false, horizontal == true],
  428 + children: <Widget>[
  429 + Transform.rotate(
  430 + angle: -pi / 2, child: const Icon(Icons.note_outlined)),
  431 + const Icon(Icons.note_outlined),
  432 + ],
433 ), 433 ),
434 ); 434 );
435 } 435 }
@@ -84,6 +84,7 @@ mixin Printing { @@ -84,6 +84,7 @@ mixin Printing {
84 for (final printer in printers) 84 for (final printer in printers)
85 if (printer.isAvailable) 85 if (printer.isAvailable)
86 SimpleDialogOption( 86 SimpleDialogOption(
  87 + onPressed: () => Navigator.of(context).pop(printer),
87 child: Text( 88 child: Text(
88 printer.name, 89 printer.name,
89 style: TextStyle( 90 style: TextStyle(
@@ -92,7 +93,6 @@ mixin Printing { @@ -92,7 +93,6 @@ mixin Printing {
92 : FontStyle.normal, 93 : FontStyle.normal,
93 ), 94 ),
94 ), 95 ),
95 - onPressed: () => Navigator.of(context).pop(printer),  
96 ), 96 ),
97 ], 97 ],
98 ), 98 ),