setString static method

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

Implementation

static Future<void> setString(String key, String value) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();

  await prefs.setString(key, value);
}