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
Julius Alibrown
2022-06-15 20:19:44 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2022-06-17 13:04:30 -0300
Commit
21be6b5644e068e8e1a9f241cc5acc03833df38f
21be6b56
1 parent
8c9b297e
Added mounted check for setState in printing>preview>raster
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
printing/lib/src/preview/raster.dart
printing/pubspec.yaml
printing/lib/src/preview/raster.dart
View file @
21be6b5
...
...
@@ -139,14 +139,17 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> {
context:
ErrorDescription
(
'while generating a PDF'
),
informationCollector:
collector
,
));
setState
(()
{
error
=
exception
;
_rastering
=
false
;
});
if
(
mounted
)
{
setState
(()
{
error
=
exception
;
_rastering
=
false
;
});
}
return
;
}
if
(
error
!=
null
)
{
if
(
error
!=
null
&&
mounted
)
{
setState
(()
{
error
=
null
;
});
...
...
@@ -182,7 +185,10 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> {
pageMargin:
widget
.
previewPageMargin
,
);
}
setState
(()
{});
if
(
mounted
)
{
setState
(()
{});
}
pageNum
++;
}
...
...
@@ -191,7 +197,9 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> {
pages
[
index
].
image
.
evict
();
}
pages
.
removeRange
(
pageNum
,
pages
.
length
);
setState
(()
{});
if
(
mounted
)
{
setState
(()
{});
}
}
catch
(
exception
,
stack
)
{
InformationCollector
?
collector
;
...
...
@@ -210,9 +218,11 @@ mixin PdfPreviewRaster on State<PdfPreviewCustom> {
informationCollector:
collector
,
));
setState
(()
{
error
=
exception
;
});
if
(
mounted
)
{
setState
(()
{
error
=
exception
;
});
}
}
_rastering
=
false
;
...
...
printing/pubspec.yaml
View file @
21be6b5
...
...
@@ -6,7 +6,7 @@ description: >
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/printing
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
5.9.
1
version
:
5.9.
2
environment
:
sdk
:
"
>=2.12.0
<3.0.0"
...
...
Please
register
or
login
to post a comment