getString method

Future<String> getString(
  1. String prefKey
)

Implementation

Future<String> getString (String prefKey) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  Pref p = getPref (prefKey);
  if (p == null) {
    return null;
  } else {
    return prefs.getString(prefKey) ?? p.defVal;
  }
}