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
2019-05-28 12:18:55 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c30ba0d031e147c51b0fd9b6a4ec738f11df4c68
c30ba0d0
1 parent
4c5c62a2
Update listener handling flutter/flutter#32936
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
45 deletions
printing/CHANGELOG.md
printing/lib/src/asset_utils.dart
printing/CHANGELOG.md
View file @
c30ba0d
# Changelog
## 2.1.0
*
Add html to pdf platform conversion
-
Add html to pdf platform conversion
-
Fix issue with flutter 1.6.2+
## 2.0.4
*
Update Readme
-
Update Readme
## 2.0.3
*
Add file save and view to example application
*
Convert print screen example to Widgets
*
Deprecate the document argument in Printing.sharePdf()
-
Add file save and view to example application
-
Convert print screen example to Widgets
-
Deprecate the document argument in Printing.sharePdf()
## 2.0.2
*
Fix example application
-
Fix example application
## 2.0.1
*
Fix Replace FlutterErrorDetails to be compatible with Dart 2.3.0
-
Fix Replace FlutterErrorDetails to be compatible with Dart 2.3.0
## 2.0.0
*
Breaking change: Switch libraries to AndroidX
*
Add Page information to PdfDoc object
-
Breaking change: Switch libraries to AndroidX
-
Add Page information to PdfDoc object
## 1.3.5
*
Restore compatibility with Flutter 1.0.0
*
Update code to Dart 2.1.0
*
Depends on pdf 1.3.3
-
Restore compatibility with Flutter 1.0.0
-
Update code to Dart 2.1.0
-
Depends on pdf 1.3.3
## 1.3.4
*
Fix iOS build with Swift
*
Add installation instructions in the Readme
*
Follow Flutter debug painting settings
-
Fix iOS build with Swift
-
Add installation instructions in the Readme
-
Follow Flutter debug painting settings
## 1.3.3
*
Fix dart lint warnings
*
Add documentation
*
Add a filename parameter for sharing
*
Convert Objective-C code to Swift
*
Update Readme
-
Fix dart lint warnings
-
Add documentation
-
Add a filename parameter for sharing
-
Convert Objective-C code to Swift
-
Update Readme
## 1.3.2
*
Fix iOS printing issues
-
Fix iOS printing issues
## 1.3.1
*
Fix pana linting notices
-
Fix pana linting notices
## 1.3.0
*
Add a Flutter like widget system
-
Add a Flutter like widget system
## 1.2.0
*
Fix compileSdkVersion to match appcompat
*
Change license to Apache 2.0
*
Implement asynchronous printing driven by the OS
-
Fix compileSdkVersion to match appcompat
-
Change license to Apache 2.0
-
Implement asynchronous printing driven by the OS
## 1.1.0
*
Rename classes to satisfy Dart conventions
*
Remove useless new and const keywords
*
Changed appcompat dependency to 26.1.0
-
Rename classes to satisfy Dart conventions
-
Remove useless new and const keywords
-
Changed appcompat dependency to 26.1.0
## 1.0.6
*
Add screenshot example
-
Add screenshot example
## 1.0.5
*
Fix printing from pdf document
-
Fix printing from pdf document
## 1.0.4
*
Update example for pdf 1.0.5
*
Add Contributing
-
Update example for pdf 1.0.5
-
Add Contributing
## 1.0.3
*
Update source formatting
*
Update README
-
Update source formatting
-
Update README
## 1.0.2
*
Add License file
*
Updated homepage
-
Add License file
-
Updated homepage
## 1.0.1
*
Fixed sdk version
-
Fixed sdk version
## 1.0.0
*
Initial release.
-
Initial release.
...
...
printing/lib/src/asset_utils.dart
View file @
c30ba0d
...
...
@@ -40,16 +40,15 @@ Future<PdfImage> pdfImageFromImageProvider(
final
ImageStream
stream
=
image
.
resolve
(
configuration
??
ImageConfiguration
.
empty
);
Future
<
void
>
listener
(
ImageInfo
image
,
bool
sync
)
async
{
ImageStreamListener
listener
;
listener
=
ImageStreamListener
((
ImageInfo
image
,
bool
sync
)
async
{
final
PdfImage
result
=
await
pdfImageFromImage
(
pdf:
pdf
,
image:
image
.
image
);
if
(!
completer
.
isCompleted
)
{
completer
.
complete
(
result
);
}
stream
.
removeListener
(
listener
);
}
void
errorListener
(
dynamic
exception
,
StackTrace
stackTrace
)
{
},
onError:
(
dynamic
exception
,
StackTrace
stackTrace
)
{
if
(!
completer
.
isCompleted
)
{
completer
.
complete
(
null
);
}
...
...
@@ -59,9 +58,9 @@ Future<PdfImage> pdfImageFromImageProvider(
// https://groups.google.com/forum/#!topic/flutter-announce/hp1RNIgej38
assert
(
false
,
'image failed to load'
);
}
}
}
);
stream
.
addListener
(
listener
,
onError:
errorListener
);
stream
.
addListener
(
listener
);
return
completer
.
future
;
}
...
...
Please
register
or
login
to post a comment