getItem method
When passed a key
name, will return that key's value, or null
if the key does not exist, in the given Storage object.
Implementation
Future<dynamic> getItem({required String key}) async {
var itemValue = await _controller.evaluateJavascript(source: """
window.$webStorageType.getItem("$key");
""");
if (itemValue == null) {
return null;
}
try {
return json.decode(itemValue);
} catch (e) {}
return itemValue;
}