setString static method

Future setString({
  1. required String key,
  2. required String value,
})

Implementation

static Future setString({required String key, required String value}) async {
  final SharedPreferences sharedPreferences =
      await SharedPreferences.getInstance();
  await sharedPreferences.setString(key, value);
}