SharedPreference

Shared Preference is used to locally save data on the device. (This page is cloned from the official docs)

Basic Example

Using setData block to save a value of Value with the key KeyName.

You can think of the key as the file name, and the value as the contents of that file.

Blocks

getData

Retrieve the data saved at the specified key.

setData

Save data to the specified key with a specified value.

removeData

Remove the data at the specified key.

Last updated