David PHAM-VAN

Remove dependency to dart:io

... ... @@ -26,9 +26,9 @@ import 'package:meta/meta.dart';
import 'package:utf/utf.dart';
import 'package:vector_math/vector_math_64.dart';
import 'src/io.dart'
if (dart.library.io) 'src/io_vm.dart'
if (dart.library.js) 'src/io_archive.dart';
import 'io/interface.dart'
if (dart.library.io) 'io/vm.dart'
if (dart.library.js) 'io/js.dart';
part 'src/annotation.dart';
part 'src/array.dart';
... ...
... ... @@ -16,6 +16,5 @@ dependencies:
crypto: "^2.0.6"
archive: "^2.0.10"
dev_dependencies:
test: any
... ...
... ... @@ -17,7 +17,6 @@
library printing;
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui' as ui;
... ...
... ... @@ -107,9 +107,6 @@ mixin Printing {
/// Opens the native printer picker interface, and returns the URL of the selected printer.
static Future<Printer> pickPrinter({Rect bounds}) async {
if (!Platform.isIOS) {
return null;
}
_channel.setMethodCallHandler(_handleMethod);
bounds ??= Rect.fromCircle(center: Offset.zero, radius: 10);
final Map<String, dynamic> params = <String, dynamic>{
... ... @@ -142,9 +139,6 @@ mixin Printing {
@required LayoutCallback onLayout,
String name = 'Document',
}) async {
if (!Platform.isIOS || printer == null) {
return false;
}
_onCompleted = Completer<bool>();
_channel.setMethodCallHandler(_handleMethod);
final List<int> bytes = await onLayout(PdfPageFormat.standard);
... ...