setString static method

Future<bool> setString(
  1. String key,
  2. String value
)

Implementation

static Future<bool> setString(String key, String value) async {
  SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
  return await sharedPreferences.setString(key, value);
}