Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2021-02-19 18:25:18 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a24aeccd4858ffba9cf60797a6d645df41422abe
a24aeccd
1 parent
24ec3e22
Fix Flutter Web not happy with FFI
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
4 deletions
printing/lib/src/method_channel.dart
printing/lib/src/method_channel_js.dart
printing/lib/src/printing_web.dart
printing/lib/src/method_channel.dart
View file @
a24aecc
...
...
@@ -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'
;
...
...
printing/lib/src/method_channel_js.dart
0 → 100644
View file @
a24aecc
/*
* 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'
);
}
...
...
printing/lib/src/printing_web.dart
View file @
a24aecc
...
...
@@ -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
{
...
...
Please
register
or
login
to post a comment