Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add InterlacedProgress handling for progressive jpeg #997

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cached_network_image/lib/cached_network_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
library cached_network_image;

export 'package:flutter_cache_manager/flutter_cache_manager.dart'
show CacheManagerLogLevel, DownloadProgress;
show CacheManagerLogLevel, DownloadProgress, InterlacedProgress;

export 'src/cached_image_widget.dart';
export 'src/image_provider/cached_network_image_provider.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ class ImageLoader implements platform.ImageLoader {
),
);
}
if (result is InterlacedProgress) {
final decoded = await decode(result.data);
yield decoded;
}
if (result is FileInfo) {
final file = result.file;
final bytes = await file.readAsBytes();
Expand Down