getDataFromAsyncStorage method
Implementation
Future<dynamic> getDataFromAsyncStorage(String key) async {
try {
final jsonValue = await SharedPreferences.getInstance()
.then((prefs) => prefs.getString(key));
return jsonValue != null ? json.decode(jsonValue) : null;
} catch (e) {
debugPrint(e.toString());
}
}