File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,20 @@ abstract class Adb {
49
49
50
50
Trace .verbose ("Downloading to ${downloadPath .absolute }" );
51
51
Trace .verbose ("Downloading from $adbFinalURL " );
52
- var rs = await Dio ().get <List <int >>(adbFinalURL,
53
- options: Options (
54
- responseType: ResponseType .bytes), // set responseType to `stream`
55
- onReceiveProgress: c,
56
- cancelToken: cancelToken);
52
+ var rs = await Dio ().get <List <int >>(
53
+ adbFinalURL,
54
+ options: Options (
55
+ responseType: ResponseType .bytes), // set responseType to `stream`
56
+ onReceiveProgress: c,
57
+ cancelToken: cancelToken,
58
+ );
57
59
58
60
var stream = rs.data;
59
61
if (stream == null ) throw "Stream is null" ;
60
62
61
63
// Decode the zip from the InputFileStream. The archive will have the contents of the
62
64
// zip, without having stored the data in memory.
63
- final archive = ZipDecoder ().decodeBuffer ( InputStream (stream));
65
+ final archive = ZipDecoder ().decodeStream ( InputMemoryStream (stream));
64
66
65
67
extractArchiveToDisk (archive, downloadPath.path);
66
68
_adbCurrentPath = (await _getADBInstalledExecPath ()).path;
You can’t perform that action at this time.
0 commit comments