I have a question about path_provider
package, i'm fetching the api data and once i received the data i cache the json
data in File
. How can i update the existing file, Because whenever i got any changes or updates in api data then it doesn't make any update or refresh on cache file data. Is there any articles or documents or videos to show how to update the existing file?
Asked
Active
Viewed 325 times
2

Mohammed Nabil
- 662
- 1
- 8
- 36
-
1if you found an answer, please tell us. – ismail Sep 20 '22 at 21:07
1 Answers
2
You can just add
File(path).deleteSync(recursive: true);
to delete the existing file then recreate it as it's a new.

ismail
- 318
- 2
- 11