Allow network input
Closed this issue · 3 comments
One of the most useful use cases for determining the image size without having to parse the entire image is when you load a big image over the network of unknown dimensions and want to determine the layout as early as possible.
The StreamedResponse
of Dart's http
library already provides a mechanism for accessing part of the data without having to wait for the entire response to be completed.
Unfortunately it is not possible to implement ImageInput
on such a network image, because http works asynchronously.
It would be really great if you could make the getRange
method async and better yet create a NetworkInput
class
Seconded, this would be really nice
Ya I have a use case
Now, support http_input.
Use image_size_getter_http_input and read document to use it.
In addition, AsyncImageInput
has been customized, which can be customized according to requirements.