Showing
3 changed files
with
9 additions
and
60 deletions
@@ -170,13 +170,9 @@ class WidgetWrapper extends pw.ImageProvider { | @@ -170,13 +170,9 @@ class WidgetWrapper extends pw.ImageProvider { | ||
170 | child: RenderPositionedBox( | 170 | child: RenderPositionedBox( |
171 | alignment: Alignment.center, child: repaintBoundary), | 171 | alignment: Alignment.center, child: repaintBoundary), |
172 | configuration: ViewConfiguration( | 172 | configuration: ViewConfiguration( |
173 | - physicalConstraints: BoxConstraints( | ||
174 | - maxWidth: computedConstraints.maxWidth, | ||
175 | - maxHeight: computedConstraints.maxHeight, | ||
176 | - ), | ||
177 | - logicalConstraints: BoxConstraints( | ||
178 | - maxWidth: computedConstraints.maxWidth, | ||
179 | - maxHeight: computedConstraints.maxHeight, | 173 | + size: Size( |
174 | + computedConstraints.maxWidth, | ||
175 | + computedConstraints.maxHeight, | ||
180 | ), | 176 | ), |
181 | devicePixelRatio: view.devicePixelRatio), | 177 | devicePixelRatio: view.devicePixelRatio), |
182 | view: view, | 178 | view: view, |
@@ -232,54 +228,3 @@ class WidgetWrapper extends pw.ImageProvider { | @@ -232,54 +228,3 @@ class WidgetWrapper extends pw.ImageProvider { | ||
232 | ); | 228 | ); |
233 | } | 229 | } |
234 | } | 230 | } |
235 | - | ||
236 | -/// ImageProvider that draws a Flutter Widget on a PDF document | ||
237 | -@Deprecated('Use WidgetWrapper instead') | ||
238 | -class WidgetWraper extends WidgetWrapper { | ||
239 | - WidgetWraper._( | ||
240 | - Uint8List bytes, | ||
241 | - int width, | ||
242 | - int height, | ||
243 | - PdfImageOrientation orientation, | ||
244 | - double? dpi, | ||
245 | - ) : super._(bytes, width, height, orientation, dpi); | ||
246 | - | ||
247 | - /// Wrap a Flutter Widget identified by a GlobalKey to an ImageProvider. | ||
248 | - @Deprecated('Use WidgetWrapper.fromKey instead') | ||
249 | - static Future<WidgetWrapper> fromKey({ | ||
250 | - required GlobalKey key, | ||
251 | - int? width, | ||
252 | - int? height, | ||
253 | - double pixelRatio = 1.0, | ||
254 | - PdfImageOrientation? orientation, | ||
255 | - double? dpi, | ||
256 | - }) { | ||
257 | - return WidgetWrapper.fromKey( | ||
258 | - key: key, | ||
259 | - width: width, | ||
260 | - pixelRatio: pixelRatio, | ||
261 | - orientation: orientation, | ||
262 | - dpi: dpi, | ||
263 | - ); | ||
264 | - } | ||
265 | - | ||
266 | - /// Wrap a Flutter Widget to an ImageProvider. | ||
267 | - @Deprecated('Use WidgetWrapper.fromWidget instead') | ||
268 | - static Future<WidgetWrapper> fromWidget({ | ||
269 | - required BuildContext context, | ||
270 | - required Widget widget, | ||
271 | - required BoxConstraints constraints, | ||
272 | - double pixelRatio = 1.0, | ||
273 | - PdfImageOrientation? orientation, | ||
274 | - double? dpi, | ||
275 | - }) { | ||
276 | - return WidgetWrapper.fromWidget( | ||
277 | - context: context, | ||
278 | - widget: widget, | ||
279 | - constraints: constraints, | ||
280 | - pixelRatio: pixelRatio, | ||
281 | - orientation: orientation, | ||
282 | - dpi: dpi, | ||
283 | - ); | ||
284 | - } | ||
285 | -} |
@@ -4,11 +4,11 @@ description: > | @@ -4,11 +4,11 @@ description: > | ||
4 | homepage: https://github.com/DavBfr/dart_pdf/tree/master/widget_wrapper | 4 | homepage: https://github.com/DavBfr/dart_pdf/tree/master/widget_wrapper |
5 | repository: https://github.com/DavBfr/dart_pdf | 5 | repository: https://github.com/DavBfr/dart_pdf |
6 | issue_tracker: https://github.com/DavBfr/dart_pdf/issues | 6 | issue_tracker: https://github.com/DavBfr/dart_pdf/issues |
7 | -version: 1.0.2 | 7 | +version: 1.0.3 |
8 | 8 | ||
9 | environment: | 9 | environment: |
10 | sdk: ">=2.18.0 <4.0.0" | 10 | sdk: ">=2.18.0 <4.0.0" |
11 | - flutter: ">=3.19.0-9.0.pre.202" | 11 | + flutter: ">=3.19.0" |
12 | 12 | ||
13 | dependencies: | 13 | dependencies: |
14 | flutter: | 14 | flutter: |
-
Please register or login to post a comment