In Flutter how to save an image from network to the local directory.
I am new to encoding and decoding images. Can anyone point me in the right direction?
You can use image_downloader.
Environment.DIRECTORY_DOWNLOADS
or specified location. By calling inExternalFilesDir()
, specification of permission becomes unnecessary.callback()
, you can get progress status.The following is the simplest example. It will be saved.
await ImageDownloader.downloadImage(url);