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
2023-05-03 08:36:15 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db84cdfddd8d0b9b8125f674ffe94e5ce9dd53b9
db84cdfd
1 parent
c0866a87
Add compatibility with Flutter 3.10
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
pdf/lib/src/svg/text.dart
printing/pubspec.yaml
widget_wrapper/lib/src/widget_wrapper.dart
widget_wrapper/pubspec.yaml
pdf/lib/src/svg/text.dart
View file @
db84cdf
...
...
@@ -60,7 +60,7 @@ class SvgText extends SvgOperation {
final
text
=
element
.
children
.
where
((
node
)
=>
node
is
XmlText
||
node
is
XmlCDATA
)
.
map
((
node
)
=>
node
.
text
)
.
map
((
node
)
=>
node
.
value
)
.
join
()
.
trim
();
...
...
printing/pubspec.yaml
View file @
db84cdf
...
...
@@ -38,8 +38,8 @@ dev_dependencies:
dependency_overrides
:
pdf
:
path
:
../pdf
# pdf_widget_wrapper:
# path: ../widget_wrapper
pdf_widget_wrapper
:
path
:
../widget_wrapper
flutter
:
plugin
:
...
...
widget_wrapper/lib/src/widget_wrapper.dart
View file @
db84cdf
...
...
@@ -164,9 +164,7 @@ class WidgetWrapper extends pw.ImageProvider {
}
final
repaintBoundary
=
RenderRepaintBoundary
();
// Flutter 3.10
// final view = View.of(context);
final
view
=
WidgetsBinding
.
instance
.
window
;
final
view
=
View
.
of
(
context
);
final
renderView
=
RenderView
(
child:
RenderPositionedBox
(
...
...
@@ -175,9 +173,7 @@ class WidgetWrapper extends pw.ImageProvider {
size:
Size
(
computedConstraints
.
maxWidth
,
computedConstraints
.
maxHeight
),
devicePixelRatio:
view
.
devicePixelRatio
),
// Flutter 3.10
// view: view,
window:
view
,
view:
view
,
);
final
pipelineOwner
=
PipelineOwner
()..
rootNode
=
renderView
;
...
...
widget_wrapper/pubspec.yaml
View file @
db84cdf
...
...
@@ -4,11 +4,11 @@ description: >
homepage
:
https://github.com/DavBfr/dart_pdf/tree/master/widget_wrapper
repository
:
https://github.com/DavBfr/dart_pdf
issue_tracker
:
https://github.com/DavBfr/dart_pdf/issues
version
:
1.0.
0
version
:
1.0.
1
environment
:
sdk
:
"
>=2.18.0
<4.0.0"
flutter
:
"
>=3.
7.0
<3.10
.0"
flutter
:
"
>=3.
9
.0"
dependencies
:
flutter
:
...
...
Please
register
or
login
to post a comment