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-06-17 07:38:07 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b7dc300793839aad3e1e1ad9b963a2b497cadccb
b7dc3007
1 parent
1129e815
Fix WidgetWraper
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
printing/CHANGELOG.md
printing/lib/src/widget_wrapper.dart
printing/CHANGELOG.md
View file @
b7dc300
...
...
@@ -7,6 +7,7 @@
-
Fix Linux build on Debian 9
-
Added a boolean toggle to show/hide debug switch
-
Fix iOS build when not using use_framework!
-
Fix WidgetWraper
## 5.2.1
...
...
printing/lib/src/widget_wrapper.dart
View file @
b7dc300
...
...
@@ -78,8 +78,18 @@ class WidgetWraper extends pw.ImageProvider {
final
wrappedWidget
=
key
.
currentContext
!.
findRenderObject
()
as
RenderRepaintBoundary
;
final
image
=
await
wrappedWidget
.
toImage
(
pixelRatio:
pixelRatio
);
final
byteData
=
await
(
image
.
toByteData
(
format:
ui
.
ImageByteFormat
.
rawRgba
)
as
FutureOr
<
ByteData
>);
final
byteData
=
await
image
.
toByteData
(
format:
ui
.
ImageByteFormat
.
rawRgba
);
if
(
byteData
==
null
)
{
return
WidgetWraper
.
_
(
Uint8List
(
0
),
0
,
0
,
PdfImageOrientation
.
topLeft
,
dpi
,
);
}
final
imageData
=
byteData
.
buffer
.
asUint8List
();
return
WidgetWraper
.
_
(
imageData
,
...
...
Please
register
or
login
to post a comment