getString static method
Implementation
static Future<String?> getString(String key) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
String? val = prefs.getString(key);
if (val != null) {
return val;
} else {
return null;
}
}