David PHAM-VAN

Add compatibility with Flutter 3.10

@@ -60,7 +60,7 @@ class SvgText extends SvgOperation { @@ -60,7 +60,7 @@ class SvgText extends SvgOperation {
60 60
61 final text = element.children 61 final text = element.children
62 .where((node) => node is XmlText || node is XmlCDATA) 62 .where((node) => node is XmlText || node is XmlCDATA)
63 - .map((node) => node.text) 63 + .map((node) => node.value)
64 .join() 64 .join()
65 .trim(); 65 .trim();
66 66
@@ -38,8 +38,8 @@ dev_dependencies: @@ -38,8 +38,8 @@ dev_dependencies:
38 dependency_overrides: 38 dependency_overrides:
39 pdf: 39 pdf:
40 path: ../pdf 40 path: ../pdf
41 - # pdf_widget_wrapper:  
42 - # path: ../widget_wrapper 41 + pdf_widget_wrapper:
  42 + path: ../widget_wrapper
43 43
44 flutter: 44 flutter:
45 plugin: 45 plugin:
@@ -164,9 +164,7 @@ class WidgetWrapper extends pw.ImageProvider { @@ -164,9 +164,7 @@ class WidgetWrapper extends pw.ImageProvider {
164 } 164 }
165 165
166 final repaintBoundary = RenderRepaintBoundary(); 166 final repaintBoundary = RenderRepaintBoundary();
167 - // Flutter 3.10  
168 - // final view = View.of(context);  
169 - final view = WidgetsBinding.instance.window; 167 + final view = View.of(context);
170 168
171 final renderView = RenderView( 169 final renderView = RenderView(
172 child: RenderPositionedBox( 170 child: RenderPositionedBox(
@@ -175,9 +173,7 @@ class WidgetWrapper extends pw.ImageProvider { @@ -175,9 +173,7 @@ class WidgetWrapper extends pw.ImageProvider {
175 size: 173 size:
176 Size(computedConstraints.maxWidth, computedConstraints.maxHeight), 174 Size(computedConstraints.maxWidth, computedConstraints.maxHeight),
177 devicePixelRatio: view.devicePixelRatio), 175 devicePixelRatio: view.devicePixelRatio),
178 - // Flutter 3.10  
179 - // view: view,  
180 - window: view, 176 + view: view,
181 ); 177 );
182 178
183 final pipelineOwner = PipelineOwner()..rootNode = renderView; 179 final pipelineOwner = PipelineOwner()..rootNode = renderView;
@@ -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.0 7 +version: 1.0.1
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.7.0 <3.10.0" 11 + flutter: ">=3.9.0"
12 12
13 dependencies: 13 dependencies:
14 flutter: 14 flutter: