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
2024-02-21 08:37:28 -0400
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
232ed40c450733f3f1d051b4c8e69ec047fa3ba3
232ed40c
2 parents
406396bf
3a584068
Merge branch 'adil192-fix-flutter-3.19'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
60 deletions
widget_wrapper/CHANGELOG.md
widget_wrapper/lib/src/widget_wrapper.dart
widget_wrapper/pubspec.yaml
widget_wrapper/CHANGELOG.md
View file @
232ed40
# Changelog
## 1.0.3
-
Add compatibility with Flutter 3.19.0
## 1.0.2
-
Add compatibility with Flutter 3.18.0-1.0.pre.23
...
...
widget_wrapper/lib/src/widget_wrapper.dart
View file @
232ed40
...
...
@@ -170,13 +170,9 @@ class WidgetWrapper extends pw.ImageProvider {
child:
RenderPositionedBox
(
alignment:
Alignment
.
center
,
child:
repaintBoundary
),
configuration:
ViewConfiguration
(
physicalConstraints:
BoxConstraints
(
maxWidth:
computedConstraints
.
maxWidth
,
maxHeight:
computedConstraints
.
maxHeight
,
),
logicalConstraints:
BoxConstraints
(
maxWidth:
computedConstraints
.
maxWidth
,
maxHeight:
computedConstraints
.
maxHeight
,
size:
Size
(
computedConstraints
.
maxWidth
,
computedConstraints
.
maxHeight
,
),
devicePixelRatio:
view
.
devicePixelRatio
),
view:
view
,
...
...
@@ -232,54 +228,3 @@ class WidgetWrapper extends pw.ImageProvider {
);
}
}
/// ImageProvider that draws a Flutter Widget on a PDF document
@Deprecated
(
'Use WidgetWrapper instead'
)
class
WidgetWraper
extends
WidgetWrapper
{
WidgetWraper
.
_
(
Uint8List
bytes
,
int
width
,
int
height
,
PdfImageOrientation
orientation
,
double
?
dpi
,
)
:
super
.
_
(
bytes
,
width
,
height
,
orientation
,
dpi
);
/// Wrap a Flutter Widget identified by a GlobalKey to an ImageProvider.
@Deprecated
(
'Use WidgetWrapper.fromKey instead'
)
static
Future
<
WidgetWrapper
>
fromKey
({
required
GlobalKey
key
,
int
?
width
,
int
?
height
,
double
pixelRatio
=
1.0
,
PdfImageOrientation
?
orientation
,
double
?
dpi
,
})
{
return
WidgetWrapper
.
fromKey
(
key:
key
,
width:
width
,
pixelRatio:
pixelRatio
,
orientation:
orientation
,
dpi:
dpi
,
);
}
/// Wrap a Flutter Widget to an ImageProvider.
@Deprecated
(
'Use WidgetWrapper.fromWidget instead'
)
static
Future
<
WidgetWrapper
>
fromWidget
({
required
BuildContext
context
,
required
Widget
widget
,
required
BoxConstraints
constraints
,
double
pixelRatio
=
1.0
,
PdfImageOrientation
?
orientation
,
double
?
dpi
,
})
{
return
WidgetWrapper
.
fromWidget
(
context:
context
,
widget:
widget
,
constraints:
constraints
,
pixelRatio:
pixelRatio
,
orientation:
orientation
,
dpi:
dpi
,
);
}
}
...
...
widget_wrapper/pubspec.yaml
View file @
232ed40
...
...
@@ -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.
2
version
:
1.0.
3
environment
:
sdk
:
"
>=2.18.0
<4.0.0"
flutter
:
"
>=3.19.0
-9.0.pre.202
"
flutter
:
"
>=3.19.0"
dependencies
:
flutter
:
...
...
Please
register
or
login
to post a comment