getString method

Future<String> getString(
  1. String key, {
  2. String defValue = "",
})

Implementation

Future<String> getString(String key, {String defValue = ""}) async{
  SharedPreferences pref = _pref!;
  String value = pref.getString(key) ?? defValue;
  return value;
}