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-06-13 08:22:59 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
00c64871c4ad1b0cba04850f10a788eaf29e3a50
00c64871
1 parent
32814dd6
Fix optionnal parameters
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
printing/lib/src/pdf_preview.dart
printing/lib/src/pdf_preview.dart
View file @
00c6487
...
...
@@ -371,7 +371,7 @@ class _PdfPreviewState extends State<PdfPreview> {
Future
<
void
>
_print
()
async
{
final
result
=
await
Printing
.
layoutPdf
(
onLayout:
widget
.
build
,
name:
widget
.
pdfFileName
,
name:
widget
.
pdfFileName
??
'Document'
,
format:
pageFormat
,
);
...
...
@@ -392,7 +392,10 @@ class _PdfPreviewState extends State<PdfPreview> {
final
bytes
=
await
widget
.
build
(
pageFormat
);
final
result
=
await
Printing
.
sharePdf
(
bytes:
bytes
,
bounds:
bounds
,
filename:
widget
.
pdfFileName
);
bytes:
bytes
,
bounds:
bounds
,
filename:
widget
.
pdfFileName
??
'document.pdf'
,
);
if
(
result
&&
widget
.
onShared
!=
null
)
{
widget
.
onShared
(
context
);
...
...
Please
register
or
login
to post a comment