retrieve method

dynamic retrieve(
  1. String key
)

Implementation

dynamic retrieve(String key) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();

  final String? mydata = await prefs.getString(key);
  var data = json.decode(mydata.toString());
  return data;
}