Showing
4 changed files
with
10 additions
and
4 deletions
@@ -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: 1.3.9 | 7 | +version: 1.3.10 |
8 | 8 | ||
9 | environment: | 9 | environment: |
10 | sdk: ">=2.1.0 <3.0.0" | 10 | sdk: ">=2.1.0 <3.0.0" |
1 | # 2.0.3 | 1 | # 2.0.3 |
2 | * Add file save and view to example application | 2 | * Add file save and view to example application |
3 | * Convert print screen example to Widgets | 3 | * Convert print screen example to Widgets |
4 | +* Deprecate the document argument in Printing.sharePdf() | ||
4 | 5 | ||
5 | # 2.0.2 | 6 | # 2.0.2 |
6 | * Fix example application | 7 | * Fix example application |
@@ -52,8 +52,10 @@ mixin Printing { | @@ -52,8 +52,10 @@ mixin Printing { | ||
52 | } | 52 | } |
53 | 53 | ||
54 | /// Prints a [PdfDocument] or a pdf stream to a local printer using the platform UI | 54 | /// Prints a [PdfDocument] or a pdf stream to a local printer using the platform UI |
55 | - @deprecated | ||
56 | - static Future<void> printPdf({PdfDocument document, List<int> bytes}) async { | 55 | + @Deprecated('use Printing.layoutPdf(onLayout: (_) => document.save());') |
56 | + static Future<void> printPdf( | ||
57 | + {@Deprecated('use bytes with document.save()') PdfDocument document, | ||
58 | + List<int> bytes}) async { | ||
57 | assert(document != null || bytes != null); | 59 | assert(document != null || bytes != null); |
58 | assert(!(document == null && bytes == null)); | 60 | assert(!(document == null && bytes == null)); |
59 | 61 | ||
@@ -64,7 +66,7 @@ mixin Printing { | @@ -64,7 +66,7 @@ mixin Printing { | ||
64 | 66 | ||
65 | /// Displays a platform popup to share the Pdf document to another application | 67 | /// Displays a platform popup to share the Pdf document to another application |
66 | static Future<void> sharePdf( | 68 | static Future<void> sharePdf( |
67 | - {PdfDocument document, | 69 | + {@Deprecated('use bytes with document.save()') PdfDocument document, |
68 | List<int> bytes, | 70 | List<int> bytes, |
69 | String filename, | 71 | String filename, |
70 | Rect bounds}) async { | 72 | Rect bounds}) async { |
-
Please register or login to post a comment