flutterobjectboxinternal-storageflutter-objectbox

ObjectBox Database & Internal Storage in Flutter Stops Working When You Update The App


I have a flutter application using ObjectBox as the database that's being stored in internal storage, and I ran into the problem of when I update the application version (for example version 1.0.0) to a new version (1.0.1) the data is lost. I'm not too sure if it's the internal storage at fault or the database.

I expect that regardless of updating the application the data stays persistent.


Solution

  • After some research, I noticed I was saving the absolute path of the content in the database and upon updating the application the absolute path became obsolete therefore I resulted to saving the name of the content and then getting the internal storage then appending the two IT WORKS JUST FINE!