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