'Flutter: How to compress network image
I want to implement image compress with cached_network_image
but I don't know how to manage both of them at a same time. How do I build my own compressed network image widget in flutter?
Solution 1:[1]
To compress image you can use flutter_image_compress
library which have common params like minWidth
and minHeight
which scales image as per value.
More params are:
- rotate: If you need to rotate the picture.
- quality: Quality of target image.
- format: Supports jpeg or png, default is jpeg.
To get more idea refer This.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mohit Ratanpara |