setString method

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

Implementation

Future<void> setString (String prefKey, String value) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  Pref p = getPref (prefKey);
  if (p != null)
    await prefs.setString(prefKey, value);
}