flutter_cached_network_image
flutter_cached_network_image copied to clipboard
Expose `scale` of CachedNetworkImageProvider on CachedNetworkImage
:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)
This PR exposes the scale
argument of CachedNetworkImageProvider
in the CachedNetworkImage
constructor.
:arrow_heading_down: What is the current behavior?
Currently you cannot set the scale
used by the implicitly instantiated CachedNetworkImageProvider
, so if you need to set the image scale then you have to use something like Image(image: CachedNetworkImageProvider(url))
so you can't take advantage of the various nice features of CachedNetworkImage
.
:new: What is the new behavior (if this is a feature change)?
Now you can pass the scale
argument.
:boom: Does this PR introduce a breaking change?
No. The argument has the same default as CachedNetworkImageProvider
so the behavior is unchanged if not supplied.
:bug: Recommendations for testing
Try supplying different values of scale
to CachedNetworkImage
and ensure they take effect.
:memo: Links to relevant issues/docs
#572
:thinking: Checklist before submitting
- [x] All projects build
- [x] Follows style guide lines (code style guide)
- [x] Relevant documentation was updated
- [x] Rebased onto current develop
It looks like the CI failure is not related to my changes:
Found "Xcode 11.1, Build version 11A1027". Xcode 12.0.1 or greater is required to develop for iOS.
I've resolved the conflicts.
Please merge this PR, really useful!
One use case could be to use it with a seamless image pattern and repeat option, in order to scale the pattern. https://www.designer.io/en/tutorials/graphic-design/how-to-design-seamless-pattern/
Any plan to merge this? I don't understand how are we supposed to deal with images too small if we want them to be displayed full screen.
I've resolved the conflicts again.
This test failure appears to be spurious.
If you don't plan to merge this PR, could you at least tell why and close it?