loadImage method
Loads the image and returns an ImageStreamCompleter that will provide the decoded image data.
This method is called by Flutter's image loading system when an image
needs to be loaded. It delegates the actual loading to _loadAsync.
Parameters:
key: The image provider key (this instance)decode: The decoder callback provided by Flutter for decoding image bytes
Returns an ImageStreamCompleter that will complete with the loaded image.
Implementation
@override
ImageStreamCompleter loadImage(
DioImageProvider key,
ImageDecoderCallback decode,
) {
return OneFrameImageStreamCompleter(_loadAsync(key, decode));
}