Read and Write Data
By default home_widget uses UserDefaults on iOS and SharedPreferences on Android to store data. In this section it is explained how to save and read data from the Flutter App as well as how to access data from your HomeScreen Widgets
Files and images
Primitive values (strings, numbers, booleans, etc.) are stored directly in UserDefaults / SharedPreferences. For binary payloads (JSON files, images, or any bytes), write a file with saveFile or saveImage and use the same id with getWidgetData: the value will be the absolute path to the file on disk, which your widget can open natively.