I use method getApplicationDocumentsDirectory() in path_provider to get the image path.
However, when I flutter run or update my app in AppStore, the path got by getApplicationDocumentDirectory() will change and I can't get the image by the path stored before.
Actually, it's easy to solve it.
I used the absolute path of the image so every time I rerun the app, the container id will change, so I cannot get the image with the previous path.
To solve it, you need to use relative path.
Relative Resource: https://github.com/flutter/flutter/issues/23957
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With