David PHAM-VAN

Merge branch 'adil192-fix-flutter-3.19'

# 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
... ...
... ... @@ -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,
);
}
}
... ...
... ... @@ -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:
... ...