David PHAM-VAN

Fix imports for Dart 2.15

@@ -45,7 +45,7 @@ Future<Uint8List> generateReport( @@ -45,7 +45,7 @@ Future<Uint8List> generateReport(
45 .map((e) => e[2] as num) 45 .map((e) => e[2] as num)
46 .reduce((value, element) => value + element); 46 .reduce((value, element) => value + element);
47 47
48 - final baseColor = PdfColors.cyan; 48 + const baseColor = PdfColors.cyan;
49 49
50 // Create a PDF document. 50 // Create a PDF document.
51 final document = pw.Document(); 51 final document = pw.Document();
@@ -166,10 +166,10 @@ Future<Uint8List> generateReport( @@ -166,10 +166,10 @@ Future<Uint8List> generateReport(
166 color: PdfColors.white, 166 color: PdfColors.white,
167 fontWeight: pw.FontWeight.bold, 167 fontWeight: pw.FontWeight.bold,
168 ), 168 ),
169 - headerDecoration: pw.BoxDecoration( 169 + headerDecoration: const pw.BoxDecoration(
170 color: baseColor, 170 color: baseColor,
171 ), 171 ),
172 - rowDecoration: pw.BoxDecoration( 172 + rowDecoration: const pw.BoxDecoration(
173 border: pw.Border( 173 border: pw.Border(
174 bottom: pw.BorderSide( 174 bottom: pw.BorderSide(
175 color: baseColor, 175 color: baseColor,
@@ -191,7 +191,7 @@ Future<Uint8List> generateReport( @@ -191,7 +191,7 @@ Future<Uint8List> generateReport(
191 return pw.Column( 191 return pw.Column(
192 children: [ 192 children: [
193 pw.Text('Budget Report', 193 pw.Text('Budget Report',
194 - style: pw.TextStyle( 194 + style: const pw.TextStyle(
195 color: baseColor, 195 color: baseColor,
196 fontSize: 40, 196 fontSize: 40,
197 )), 197 )),
@@ -210,7 +210,7 @@ Future<Uint8List> generateReport( @@ -210,7 +210,7 @@ Future<Uint8List> generateReport(
210 padding: const pw.EdgeInsets.only(bottom: 10), 210 padding: const pw.EdgeInsets.only(bottom: 10),
211 child: pw.Text( 211 child: pw.Text(
212 'Expense By Sub-Categories', 212 'Expense By Sub-Categories',
213 - style: pw.TextStyle( 213 + style: const pw.TextStyle(
214 color: baseColor, 214 color: baseColor,
215 fontSize: 16, 215 fontSize: 16,
216 ), 216 ),
@@ -230,7 +230,7 @@ Future<Uint8List> generateReport( @@ -230,7 +230,7 @@ Future<Uint8List> generateReport(
230 padding: const pw.EdgeInsets.only(bottom: 10), 230 padding: const pw.EdgeInsets.only(bottom: 10),
231 child: pw.Text( 231 child: pw.Text(
232 'Spent vs. Saved', 232 'Spent vs. Saved',
233 - style: pw.TextStyle( 233 + style: const pw.TextStyle(
234 color: baseColor, 234 color: baseColor,
235 fontSize: 16, 235 fontSize: 16,
236 ), 236 ),
@@ -273,7 +273,7 @@ Future<Uint8List> generateReport( @@ -273,7 +273,7 @@ Future<Uint8List> generateReport(
273 child: pw.Chart( 273 child: pw.Chart(
274 title: pw.Text( 274 title: pw.Text(
275 'Expense breakdown', 275 'Expense breakdown',
276 - style: pw.TextStyle( 276 + style: const pw.TextStyle(
277 color: baseColor, 277 color: baseColor,
278 fontSize: 20, 278 fontSize: 20,
279 ), 279 ),
1 # Changelog 1 # Changelog
2 2
  3 +## 3.6.6
  4 +
  5 +- Fix imports for Dart 2.15
  6 +
3 ## 3.6.5 7 ## 3.6.5
4 8
5 - Update dependencies 9 - Update dependencies
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 16
17 import 'package:archive/archive.dart'; 17 import 'package:archive/archive.dart';
18 18
19 -import 'package:pdf/pdf.dart'; 19 +import '../document.dart';
20 20
21 /// Zip compression function 21 /// Zip compression function
22 DeflateCallback defaultDeflate = const ZLibEncoder().encode; 22 DeflateCallback defaultDeflate = const ZLibEncoder().encode;
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 16
17 import 'dart:io'; 17 import 'dart:io';
18 18
19 -import 'package:pdf/pdf.dart'; 19 +import '../document.dart';
20 20
21 /// Zip compression function 21 /// Zip compression function
22 DeflateCallback defaultDeflate = zlib.encode; 22 DeflateCallback defaultDeflate = zlib.encode;
@@ -16,12 +16,11 @@ @@ -16,12 +16,11 @@
16 16
17 import 'dart:typed_data'; 17 import 'dart:typed_data';
18 18
19 -import 'package:pdf/src/pdf/object_stream.dart';  
20 -  
21 import 'data_types.dart'; 19 import 'data_types.dart';
22 import 'document.dart'; 20 import 'document.dart';
23 import 'object.dart'; 21 import 'object.dart';
24 import 'object_dict.dart'; 22 import 'object_dict.dart';
  23 +import 'object_stream.dart';
25 import 'stream.dart'; 24 import 'stream.dart';
26 25
27 /// Signature flags 26 /// Signature flags
@@ -16,10 +16,9 @@ @@ -16,10 +16,9 @@
16 16
17 import 'dart:typed_data'; 17 import 'dart:typed_data';
18 18
19 -import 'package:pdf/src/pdf/stream.dart';  
20 -  
21 import 'data_types.dart'; 19 import 'data_types.dart';
22 import 'object.dart'; 20 import 'object.dart';
  21 +import 'stream.dart';
23 22
24 enum PdfCrossRefEntryType { free, inUse } 23 enum PdfCrossRefEntryType { free, inUse }
25 24
@@ -15,10 +15,10 @@ @@ -15,10 +15,10 @@
15 */ 15 */
16 16
17 import 'package:pdf/pdf.dart'; 17 import 'package:pdf/pdf.dart';
18 -import 'package:pdf/src/svg/color.dart';  
19 -import 'package:pdf/widgets.dart';  
20 18
  19 +import '../widgets/font.dart';
21 import 'brush.dart'; 20 import 'brush.dart';
  21 +import 'color.dart';
22 import 'group.dart'; 22 import 'group.dart';
23 import 'parser.dart'; 23 import 'parser.dart';
24 24
@@ -17,10 +17,10 @@ @@ -17,10 +17,10 @@
17 import 'dart:math'; 17 import 'dart:math';
18 18
19 import 'package:pdf/pdf.dart'; 19 import 'package:pdf/pdf.dart';
20 -import 'package:pdf/widgets.dart';  
21 import 'package:vector_math/vector_math_64.dart'; 20 import 'package:vector_math/vector_math_64.dart';
22 import 'package:xml/xml.dart'; 21 import 'package:xml/xml.dart';
23 22
  23 +import '../widgets/widget.dart';
24 import 'brush.dart'; 24 import 'brush.dart';
25 import 'clip_path.dart'; 25 import 'clip_path.dart';
26 import 'operation.dart'; 26 import 'operation.dart';
@@ -14,11 +14,10 @@ @@ -14,11 +14,10 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 -import 'package:pdf/src/pdf/point.dart';  
18 -import 'package:pdf/src/widgets/geometry.dart';  
19 -import 'package:pdf/src/widgets/widget.dart'; 17 +import 'package:pdf/pdf.dart';
20 18
21 -import '../../pdf.dart'; 19 +import 'geometry.dart';
  20 +import 'widget.dart';
22 21
23 class Circle extends Widget { 22 class Circle extends Widget {
24 Circle({this.fillColor, this.strokeColor, this.strokeWidth = 1.0}); 23 Circle({this.fillColor, this.strokeColor, this.strokeWidth = 1.0});
@@ -19,11 +19,11 @@ import 'dart:math' as math; @@ -19,11 +19,11 @@ import 'dart:math' as math;
19 19
20 import 'package:meta/meta.dart'; 20 import 'package:meta/meta.dart';
21 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
22 -import 'package:pdf/widgets.dart';  
23 import 'package:vector_math/vector_math_64.dart'; 22 import 'package:vector_math/vector_math_64.dart';
24 23
25 import 'document.dart'; 24 import 'document.dart';
26 import 'geometry.dart'; 25 import 'geometry.dart';
  26 +import 'multi_page.dart';
27 import 'page.dart'; 27 import 'page.dart';
28 import 'theme.dart'; 28 import 'theme.dart';
29 29
@@ -3,7 +3,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl @@ -3,7 +3,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
3 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf 3 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
4 repository: https://github.com/DavBfr/dart_pdf 4 repository: https://github.com/DavBfr/dart_pdf
5 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 5 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
6 -version: 3.6.5 6 +version: 3.6.6
7 7
8 environment: 8 environment:
9 sdk: ">=2.12.0 <3.0.0" 9 sdk: ">=2.12.0 <3.0.0"
1 # Changelog 1 # Changelog
2 2
  3 +## 5.6.7
  4 +
  5 +- Fix imports for Dart 2.15
  6 +
3 ## 5.6.6 7 ## 5.6.6
4 8
5 - Update dependencies 9 - Update dependencies
@@ -17,14 +17,12 @@ @@ -17,14 +17,12 @@
17 import 'dart:async'; 17 import 'dart:async';
18 import 'dart:html' as html; 18 import 'dart:html' as html;
19 import 'dart:html'; 19 import 'dart:html';
20 -import 'dart:io';  
21 import 'dart:js' as js; 20 import 'dart:js' as js;
22 import 'dart:js_util'; 21 import 'dart:js_util';
23 import 'dart:typed_data'; 22 import 'dart:typed_data';
24 import 'dart:ui'; 23 import 'dart:ui';
25 24
26 import 'package:flutter/foundation.dart'; 25 import 'package:flutter/foundation.dart';
27 -import 'package:flutter/rendering.dart' show Rect;  
28 import 'package:flutter_web_plugins/flutter_web_plugins.dart'; 26 import 'package:flutter_web_plugins/flutter_web_plugins.dart';
29 import 'package:image/image.dart' as im; 27 import 'package:image/image.dart' as im;
30 import 'package:pdf/pdf.dart'; 28 import 'package:pdf/pdf.dart';
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17 -import 'package:flutter/foundation.dart';  
18 import 'package:flutter/material.dart'; 17 import 'package:flutter/material.dart';
19 18
20 import '../raster.dart'; 19 import '../raster.dart';
@@ -18,7 +18,6 @@ import 'dart:async'; @@ -18,7 +18,6 @@ import 'dart:async';
18 import 'dart:typed_data'; 18 import 'dart:typed_data';
19 19
20 import 'package:flutter/material.dart'; 20 import 'package:flutter/material.dart';
21 -import 'package:flutter/rendering.dart' show Rect, Offset;  
22 import 'package:pdf/pdf.dart'; 21 import 'package:pdf/pdf.dart';
23 22
24 import 'callback.dart'; 23 import 'callback.dart';
@@ -6,7 +6,7 @@ description: > @@ -6,7 +6,7 @@ description: >
6 homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing 6 homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing
7 repository: https://github.com/DavBfr/dart_pdf 7 repository: https://github.com/DavBfr/dart_pdf
8 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 8 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
9 -version: 5.6.6 9 +version: 5.6.7
10 10
11 environment: 11 environment:
12 sdk: ">=2.12.0 <3.0.0" 12 sdk: ">=2.12.0 <3.0.0"
@@ -22,7 +22,7 @@ dependencies: @@ -22,7 +22,7 @@ dependencies:
22 image: ">=3.0.1 <=4.0.0" 22 image: ">=3.0.1 <=4.0.0"
23 js: ^0.6.3 23 js: ^0.6.3
24 meta: ^1.7.0 24 meta: ^1.7.0
25 - pdf: ^3.6.5 25 + pdf: ^3.6.6
26 plugin_platform_interface: ^2.0.0 26 plugin_platform_interface: ^2.0.0
27 27
28 dev_dependencies: 28 dev_dependencies: