getString method
Gets a string value from the cache with the given key.
Returns null if the key is not found. The value is decoded from UTF-8 bytes.
Implementation
Future<String?> getString(String key) async {
final bytes = await get(key);
if (bytes == null) {
return null;
}
return utf8.decode(bytes);
}