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
2022-01-31 19:05:31 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cc231e590d3ffab74ec57a3aac65794b4989079a
cc231e59
1 parent
b237938b
Add onPageFormatChanged event
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
printing/CHANGELOG.md
printing/lib/src/preview/pdf_preview.dart
printing/CHANGELOG.md
View file @
cc231e5
...
...
@@ -3,6 +3,7 @@
## 5.7.2
-
Fix dispose state issue
-
Add onPageFormatChanged event
## 5.7.1
...
...
printing/lib/src/preview/pdf_preview.dart
View file @
cc231e5
...
...
@@ -59,6 +59,7 @@ class PdfPreview extends StatefulWidget {
this
.
padding
,
this
.
shouldRepaint
=
false
,
this
.
loadingWidget
,
this
.
onPageFormatChanged
,
})
:
super
(
key:
key
);
static
const
_defaultPageFormats
=
<
String
,
PdfPageFormat
>{
...
...
@@ -154,6 +155,9 @@ class PdfPreview extends StatefulWidget {
/// If null, a [CircularProgressIndicator] is used instead.
final
Widget
?
loadingWidget
;
/// The page format has changed
final
ValueChanged
<
PdfPageFormat
>?
onPageFormatChanged
;
@override
_PdfPreviewState
createState
()
=>
_PdfPreviewState
();
}
...
...
@@ -198,6 +202,7 @@ class _PdfPreviewState extends State<PdfPreview> {
if
(
mounted
)
{
setState
(()
{});
}
widget
.
onPageFormatChanged
?.
call
(
previewData
.
pageFormat
);
});
super
.
initState
();
...
...
Please
register
or
login
to post a comment