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
Deepak
2021-04-09 10:40:40 +0530
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2021-04-09 09:09:29 -0300
Commit
b9b6da071aef0cad2130d000d384244d076e2eca
b9b6da07
1 parent
ffb333a4
subject, body and emails parameter to pdf preview
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
printing/lib/src/pdf_preview.dart
printing/lib/src/pdf_preview.dart
View file @
b9b6da0
...
...
@@ -36,6 +36,9 @@ class PdfPreview extends StatefulWidget {
this
.
useActions
=
true
,
this
.
pages
,
this
.
dynamicLayout
=
true
,
this
.
shareActionExtraBody
,
this
.
shareActionExtraSubject
,
this
.
shareActionExtraEmails
,
})
:
super
(
key:
key
);
/// Called when a pdf document is needed
...
...
@@ -97,6 +100,17 @@ class PdfPreview extends StatefulWidget {
/// channel message while opened.
final
bool
dynamicLayout
;
/// email subject when email application is selected from the share dialog
final
String
?
shareActionExtraSubject
;
/// extra text to share with Pdf document
final
String
?
shareActionExtraBody
;
/// list of email addresses which will be filled automatically if the email application
/// is selected from the share dialog.
/// This will work only for Android platform.
final
List
<
String
>?
shareActionExtraEmails
;
@override
_PdfPreviewState
createState
()
=>
_PdfPreviewState
();
}
...
...
@@ -590,6 +604,9 @@ class _PdfPreviewState extends State<PdfPreview> {
bytes:
bytes
,
bounds:
bounds
,
filename:
widget
.
pdfFileName
??
'document.pdf'
,
body:
widget
.
shareActionExtraBody
,
subject:
widget
.
shareActionExtraSubject
,
emails:
widget
.
shareActionExtraEmails
,
);
if
(
result
&&
widget
.
onShared
!=
null
)
{
...
...
Please
register
or
login
to post a comment