set static method
Using SharedPreferences
, it saves the value given to the
local database as String. If you are going to send a list,
convert the list to an encrypted String using JeaFire.encode
and then save the data using this function. Use get
to retrieve data. If you sent encrypted data, decrypt it using JeaFire.decode.
Implementation
static Future<void> set(String key, String value) async {
final prefs = await SharedPreferences.getInstance();
prefs.setString(key, value);
}