getString static method

Future getString({
  1. required String key,
})

Implementation

static Future getString({required String key}) async {
  final SharedPreferences sharedPreferences =
      await SharedPreferences.getInstance();
  var cache = sharedPreferences.getString(key);
  return cache;
}