getString static method

Future<String?> getString(
  1. String key
)

Implementation

static Future<String?> getString(String key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  return prefs.getString(key);
}