David PHAM-VAN

Fix some linting issues

... ... @@ -127,9 +127,6 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
final bytes = await build(pageFormat);
final appDocDir = await getApplicationDocumentsDirectory();
if (appDocDir == null) {
return;
}
final appDocPath = appDocDir.path;
final file = File(appDocPath + '/' + 'document.pdf');
print('Save as file ${file.path} ...');
... ...
# Changelog
## 3.0.2
- Fix some linting issues
## 3.0.1
- Improve internal null-safety
... ...
... ... @@ -19,4 +19,4 @@ import 'package:archive/archive.dart';
import 'package:pdf/pdf.dart';
/// Zip compression function
DeflateCallback defaultDeflate = ZLibEncoder().encode;
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
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: 3.0.1
version: 3.0.2
environment:
sdk: ">=2.12.0-0 <3.0.0"
... ...
... ... @@ -3,6 +3,7 @@
## 5.0.2
- Fix iOS/macOS release build not working
- Fix some linting issues
## 5.0.1
... ...
... ... @@ -390,9 +390,9 @@ class _PdfPreviewState extends State<PdfPreview> {
final key = keys[index];
final val = _pageFormats[key];
return DropdownMenuItem<PdfPageFormat>(
value: val,
child: Text(key,
style: TextStyle(color: theme.accentIconTheme.color)),
value: val,
);
},
),
... ... @@ -418,11 +418,6 @@ class _PdfPreviewState extends State<PdfPreview> {
color: disabledColor,
selectedBorderColor: color,
selectedColor: color,
children: <Widget>[
Transform.rotate(
angle: -pi / 2, child: const Icon(Icons.note_outlined)),
const Icon(Icons.note_outlined),
],
onPressed: (int index) {
setState(() {
horizontal = index == 1;
... ... @@ -430,6 +425,11 @@ class _PdfPreviewState extends State<PdfPreview> {
});
},
isSelected: <bool>[horizontal == false, horizontal == true],
children: <Widget>[
Transform.rotate(
angle: -pi / 2, child: const Icon(Icons.note_outlined)),
const Icon(Icons.note_outlined),
],
),
);
}
... ...
... ... @@ -84,6 +84,7 @@ mixin Printing {
for (final printer in printers)
if (printer.isAvailable)
SimpleDialogOption(
onPressed: () => Navigator.of(context).pop(printer),
child: Text(
printer.name,
style: TextStyle(
... ... @@ -92,7 +93,6 @@ mixin Printing {
: FontStyle.normal,
),
),
onPressed: () => Navigator.of(context).pop(printer),
),
],
),
... ...