getString static method

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

Implementation

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