getDataFromAsyncStorage method

Future getDataFromAsyncStorage(
  1. String key
)

Implementation

Future<dynamic> getDataFromAsyncStorage(String key) async {
  final prefs = await SharedPreferences.getInstance();
  final jsonValue = prefs.getString(key);
  return jsonValue != null ? json.decode(jsonValue) : null;
}