David PHAM-VAN

Fix Flutter Web not happy with FFI

... ... @@ -21,10 +21,10 @@ import 'dart:typed_data';
import 'package:flutter/rendering.dart' show Rect;
import 'package:flutter/services.dart';
import 'package:pdf/pdf.dart';
import 'package:printing/src/method_channel_ffi.dart';
import 'callback.dart';
import 'interface.dart';
import 'method_channel_ffi.dart' if (dart.library.js) 'method_channel_js.dart';
import 'print_job.dart';
import 'printer.dart';
import 'printing_info.dart';
... ...
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import 'dart:typed_data';
import 'print_job.dart';
/// Set the Pdf document data
void setDocumentFfi(PrintJob job, Uint8List data) {
throw UnimplementedError('Not using FFI');
}
/// Set the Pdf Error message
void setErrorFfi(PrintJob job, String message) {
throw UnimplementedError('Not using FFI');
}
... ...
... ... @@ -27,13 +27,13 @@ import 'package:flutter/rendering.dart' show Rect;
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:image/image.dart' as im;
import 'package:pdf/pdf.dart';
import 'package:printing/src/pdfjs.dart';
import 'package:printing/src/printer.dart';
import 'package:printing/src/raster.dart';
import 'callback.dart';
import 'interface.dart';
import 'pdfjs.dart';
import 'printer.dart';
import 'printing_info.dart';
import 'raster.dart';
/// Print plugin targetting Flutter on the Web
class PrintingPlugin extends PrintingPlatform {
... ...