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
2021-04-23 06:46:06 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0e06f2971f288d300c0dcc027e8100b54aebacaa
0e06f297
1 parent
45a9de7e
Add shouldRepaint parameter
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
printing/CHANGELOG.md
printing/lib/src/pdf_preview.dart
printing/CHANGELOG.md
View file @
0e06f29
...
...
@@ -5,6 +5,7 @@
-
Improve Android page format detection
[
Deepak
]
-
Add previewPageMargin and padding parameters
[
Deepak
]
-
Fix Scrollbar positionning and default margins
-
Add shouldRepaint parameter
## 5.1.0
...
...
printing/lib/src/pdf_preview.dart
View file @
0e06f29
...
...
@@ -41,6 +41,7 @@ class PdfPreview extends StatefulWidget {
this
.
shareActionExtraEmails
,
this
.
previewPageMargin
,
this
.
padding
,
this
.
shouldRepaint
=
false
,
})
:
super
(
key:
key
);
/// Called when a pdf document is needed
...
...
@@ -121,6 +122,9 @@ class PdfPreview extends StatefulWidget {
/// padding for the pdf_preview widget
final
EdgeInsets
?
padding
;
/// Force repainting the PDF document
final
bool
shouldRepaint
;
@override
_PdfPreviewState
createState
()
=>
_PdfPreviewState
();
}
...
...
@@ -292,7 +296,7 @@ class _PdfPreviewState extends State<PdfPreview> {
@override
void
didUpdateWidget
(
covariant
PdfPreview
oldWidget
)
{
if
(
oldWidget
.
build
!=
widget
.
build
)
{
if
(
oldWidget
.
build
!=
widget
.
build
||
widget
.
shouldRepaint
)
{
preview
=
null
;
updatePosition
=
null
;
_raster
();
...
...
Please
register
or
login
to post a comment