Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,14 @@
}
if (asset.mime == 'application/zip') {
final inputStream = InputFileStream(asset.fullPath);
final archive = ZipDecoder().decodeBuffer(inputStream);
final decoder = ZipDecoder();
Archive archive;
try {
// Compatible with archive v4.
archive = (decoder as dynamic).decodeStream(inputStream);
} on NoSuchMethodError {
archive = (decoder as dynamic).decodeBuffer(inputStream);

Check warning on line 133 in packages/core/lib/generators/integrations/lottie_integration.dart

View check run for this annotation

Codecov / codecov/patch

packages/core/lib/generators/integrations/lottie_integration.dart#L132-L133

Added lines #L132 - L133 were not covered by tests
}
final jsonFile = archive.files.firstWhereOrNull(
(e) => e.name.endsWith('.json'),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
glob: ^2.0.0

dart_style: '>=2.2.4 <4.0.0'
archive: ^3.4.0
archive: '>=3.4.0 <5.0.0'
args: ^2.0.0
pub_semver: ^2.0.0
vector_graphics_compiler: ^1.1.9
Expand Down
Loading