mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge 77570cff6db745cf4e8015a7eb97bb8c02cef87e into 06df71c51446e96939c6a615b7c34ce9123806ba
This commit is contained in:
commit
1932b0de2a
@ -747,14 +747,14 @@ Future<Codec> instantiateImageCodecWithSize(
|
||||
FrameInfo? info;
|
||||
try {
|
||||
if (getTargetSize == null) {
|
||||
return engine.renderer.instantiateImageCodec(buffer._list!);
|
||||
return await engine.renderer.instantiateImageCodec(buffer._list!);
|
||||
} else {
|
||||
codec = await engine.renderer.instantiateImageCodec(buffer._list!);
|
||||
info = await codec.getNextFrame();
|
||||
final int width = info.image.width;
|
||||
final int height = info.image.height;
|
||||
final TargetImageSize targetSize = getTargetSize(width, height);
|
||||
return engine.renderer.instantiateImageCodec(
|
||||
return await engine.renderer.instantiateImageCodec(
|
||||
buffer._list!,
|
||||
targetWidth: targetSize.width,
|
||||
targetHeight: targetSize.height,
|
||||
|
||||
@ -364,7 +364,7 @@ Future<Uint8List> fetchImage(String url, ui_web.ImageCodecChunkCallback? chunkCa
|
||||
}
|
||||
|
||||
if (chunkCallback != null && contentLength != null) {
|
||||
return readChunked(response.payload, contentLength, chunkCallback);
|
||||
return await readChunked(response.payload, contentLength, chunkCallback);
|
||||
} else {
|
||||
return await response.asUint8List();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user