get method

  1. @override
Future get(
  1. String key
)
override

Retrieves an item from the cache.

Implementation

@override
Future<dynamic> get(String key) async {
  final cmd = await _getCommand();
  final value = await cmd.get(key);
  if (value == null) return null;

  try {
    return jsonDecode(value as String);
  } catch (_) {
    return value;
  }
}