File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
lib/generators/integrations Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,14 @@ ${isPackage ? "\n static const String package = '$packageName';" : ''}
124
124
}
125
125
if (asset.mime == 'application/zip' ) {
126
126
final inputStream = InputFileStream (asset.fullPath);
127
- final archive = ZipDecoder ().decodeBuffer (inputStream);
127
+ final decoder = ZipDecoder ();
128
+ Archive archive;
129
+ try {
130
+ // Compatible with archive v4.
131
+ archive = (decoder as dynamic ).decodeStream (inputStream);
132
+ } on NoSuchMethodError {
133
+ archive = (decoder as dynamic ).decodeBuffer (inputStream);
134
+ }
128
135
final jsonFile = archive.files.firstWhereOrNull (
129
136
(e) => e.name.endsWith ('.json' ),
130
137
);
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ dependencies:
25
25
glob : ^2.0.0
26
26
27
27
dart_style : ' >=2.2.4 <4.0.0'
28
- archive : ^ 3.4.0
28
+ archive : ' >= 3.4.0 <5.0.0 '
29
29
args : ^2.0.0
30
30
pub_semver : ^2.0.0
31
31
vector_graphics_compiler : ^1.1.9
You can’t perform that action at this time.
0 commit comments