David PHAM-VAN

Remove dependency to dart:io

@@ -26,9 +26,9 @@ import 'package:meta/meta.dart'; @@ -26,9 +26,9 @@ import 'package:meta/meta.dart';
26 import 'package:utf/utf.dart'; 26 import 'package:utf/utf.dart';
27 import 'package:vector_math/vector_math_64.dart'; 27 import 'package:vector_math/vector_math_64.dart';
28 28
29 -import 'src/io.dart'  
30 - if (dart.library.io) 'src/io_vm.dart'  
31 - if (dart.library.js) 'src/io_archive.dart'; 29 +import 'io/interface.dart'
  30 + if (dart.library.io) 'io/vm.dart'
  31 + if (dart.library.js) 'io/js.dart';
32 32
33 part 'src/annotation.dart'; 33 part 'src/annotation.dart';
34 part 'src/array.dart'; 34 part 'src/array.dart';
@@ -15,7 +15,6 @@ dependencies: @@ -15,7 +15,6 @@ dependencies:
15 utf: "^0.9.0" 15 utf: "^0.9.0"
16 crypto: "^2.0.6" 16 crypto: "^2.0.6"
17 archive: "^2.0.10" 17 archive: "^2.0.10"
18 -  
19 18
20 dev_dependencies: 19 dev_dependencies:
21 test: any 20 test: any
@@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
17 library printing; 17 library printing;
18 18
19 import 'dart:async'; 19 import 'dart:async';
20 -import 'dart:io';  
21 import 'dart:typed_data'; 20 import 'dart:typed_data';
22 import 'dart:ui' as ui; 21 import 'dart:ui' as ui;
23 22
@@ -107,9 +107,6 @@ mixin Printing { @@ -107,9 +107,6 @@ mixin Printing {
107 107
108 /// Opens the native printer picker interface, and returns the URL of the selected printer. 108 /// Opens the native printer picker interface, and returns the URL of the selected printer.
109 static Future<Printer> pickPrinter({Rect bounds}) async { 109 static Future<Printer> pickPrinter({Rect bounds}) async {
110 - if (!Platform.isIOS) {  
111 - return null;  
112 - }  
113 _channel.setMethodCallHandler(_handleMethod); 110 _channel.setMethodCallHandler(_handleMethod);
114 bounds ??= Rect.fromCircle(center: Offset.zero, radius: 10); 111 bounds ??= Rect.fromCircle(center: Offset.zero, radius: 10);
115 final Map<String, dynamic> params = <String, dynamic>{ 112 final Map<String, dynamic> params = <String, dynamic>{
@@ -142,9 +139,6 @@ mixin Printing { @@ -142,9 +139,6 @@ mixin Printing {
142 @required LayoutCallback onLayout, 139 @required LayoutCallback onLayout,
143 String name = 'Document', 140 String name = 'Document',
144 }) async { 141 }) async {
145 - if (!Platform.isIOS || printer == null) {  
146 - return false;  
147 - }  
148 _onCompleted = Completer<bool>(); 142 _onCompleted = Completer<bool>();
149 _channel.setMethodCallHandler(_handleMethod); 143 _channel.setMethodCallHandler(_handleMethod);
150 final List<int> bytes = await onLayout(PdfPageFormat.standard); 144 final List<int> bytes = await onLayout(PdfPageFormat.standard);