David PHAM-VAN

Restore compatibility with Flutter 1.0.0

  1 +# 1.3.5
  2 +* Restore compatibility with Flutter 1.0.0
  3 +
1 # 1.3.4 4 # 1.3.4
2 * Fix iOS build with Swift 5 * Fix iOS build with Swift
3 * Add installation instructions in the Readme 6 * Add installation instructions in the Readme
@@ -36,8 +36,7 @@ mixin Printing { @@ -36,8 +36,7 @@ mixin Printing {
36 final Map<String, dynamic> params = <String, dynamic>{ 36 final Map<String, dynamic> params = <String, dynamic>{
37 'doc': Uint8List.fromList(bytes), 37 'doc': Uint8List.fromList(bytes),
38 }; 38 };
39 - await _channel.invokeMethod<void>('writePdf', params);  
40 - return Future<void>.value(); 39 + return await _channel.invokeMethod('writePdf', params);
41 } 40 }
42 } 41 }
43 42
@@ -49,7 +48,7 @@ mixin Printing { @@ -49,7 +48,7 @@ mixin Printing {
49 _onLayout = onLayout; 48 _onLayout = onLayout;
50 _channel.setMethodCallHandler(_handleMethod); 49 _channel.setMethodCallHandler(_handleMethod);
51 final Map<String, dynamic> params = <String, dynamic>{'name': name}; 50 final Map<String, dynamic> params = <String, dynamic>{'name': name};
52 - await _channel.invokeMethod<void>('printPdf', params); 51 + return await _channel.invokeMethod('printPdf', params);
53 } 52 }
54 53
55 /// Prints a [PdfDocument] or a pdf stream to a local printer using the platform UI 54 /// Prints a [PdfDocument] or a pdf stream to a local printer using the platform UI
@@ -86,6 +85,6 @@ mixin Printing { @@ -86,6 +85,6 @@ mixin Printing {
86 'w': bounds.width, 85 'w': bounds.width,
87 'h': bounds.height, 86 'h': bounds.height,
88 }; 87 };
89 - await _channel.invokeMethod<void>('sharePdf', params); 88 + return await _channel.invokeMethod('sharePdf', params);
90 } 89 }
91 } 90 }
@@ -2,7 +2,7 @@ name: printing @@ -2,7 +2,7 @@ name: printing
2 author: David PHAM-VAN <dev.nfet.net@gmail.com> 2 author: David PHAM-VAN <dev.nfet.net@gmail.com>
3 description: Plugin that allows Flutter apps to generate and print documents to android or ios compatible printers 3 description: Plugin that allows Flutter apps to generate and print documents to android or ios compatible printers
4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing 4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/printing
5 -version: 1.3.4 5 +version: 1.3.5
6 6
7 environment: 7 environment:
8 sdk: ">=1.19.0 <3.0.0" 8 sdk: ">=1.19.0 <3.0.0"