The shared preferences component commonly used to save files locally as a file data.
If we make a program. in which we use data from the user, save them in local storage so that it does not take a data from the user again or again.
Or the program in which we create a big data source, and provide data to user many times
and the program can be availability in easy or offline mode.
when we make this types program in which save data locally we need shared preferences component.
In short save data in device storage
let’s start learning how to use shared preferences component in sketchwere and block programming.
there are three blocks in sketchwere to use in shared preferences component.
- according to the image the first block is used to get data from saved on storage with the help of saved key.
- second block is used to save data(value) by key on local storage.
- and third block is used to remove data(value) by key from local saved data.