Add more flexible image API (#118966)

This updates the framework to provide higher level wrappers around ui.instantiateImageCodecWithSize(). Functionally, this doesn't change anything (other than deprecating the older loadBuffer() method in favor of loadImage()), but it sets the stage for a simpler change that will allow us to provide a more flexible way to load sized images.

#118543
This commit is contained in:
Todd Volkert
2023-01-25 21:21:28 -08:00
committed by GitHub
parent 202e902742
commit b319938ecd
12 changed files with 323 additions and 57 deletions

View File

@@ -58,7 +58,7 @@ class DelayedBase64Image extends ImageProvider<int> {
}
@override
ImageStreamCompleter loadBuffer(int key, DecoderBufferCallback decode) {
ImageStreamCompleter loadImage(int key, ImageDecoderCallback decode) {
return MultiFrameImageStreamCompleter(
codec: Future<ui.Codec>.delayed(
delay,