I have response from an get API and the response is an array of oject. In response object,there is an image property which have online image string. I am fetching data from API and inserting then into SQLite database so that I have that data while I am offline. I don't want to store or download the image files in local folder because the number of data is around 2k. If I store that much image in asset folder, my app size will be very big. How can I get the image from database while i am offline? Should I convert the image string into BASE64 string and use Image.memory? Is it the way to do so? Below is the response I am getting from API.
{
"name": "Kamal",
"image": "https://drive.google.com/file/d/1y1yYO0X8warJliizAo5ghKRP6cFdYvb9/view?usp=sharing",
"age": 25,
"phoneNo": 156789798
}
Update: When starting up my app, I want to fetch the image string from the database and load the in cache or any local directory for offline use. I have used CachedNetworkImageProvider and cached_network_image package. It gives me the following error
Exception: Could not instantiate image codec.
The image string which I have saved in sqlite from API is given below
"image": "https://drive.google.com/file/d/1y1yYO0X8warJliizAo5ghKRP6cFdYvb9/view?usp=sharing",