Skip to content

Commit

Permalink
feat: add InterlacedProgress handling for progressive jpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
glemartret committed Dec 20, 2024
1 parent 0775e1f commit edebc26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit edebc26

Please sign in to comment.