best practice to dynamically store local images with flutter - hive, folder

Viewed 586

I am downloading class objects that also contain images to the flutter app and store them locally. Simple data such as strings and numbers are stored in a hive database.

However, what is the best way to store the images? I found some comments that storing them directly in hive is not a good idea and conversion to base64 and Uint8List seem to emphasize this (actually is Uint8List needed or could I directly store base64 to hive - as appears to be possible with Mongo?).

The most obvious choice for me would then to store the images as a file and only keep the path/filename as a reference in hive.

Or are there better ways of doing?

I have looked-up quite a few questions and answers, but they dealt about either about how to store them in sqlite, hive etc. or about temporarily cached images or about static images that come with the app.

0 Answers
Related