get<T, Y> method
get an object T
from sessionKey
position
a factory function converter
can be provided
to convert from stored type Y
to desired return type T
Implementation
Future<T> get<T, Y>(SessionKey sessionKey, [T Function(Y)? converter]) async {
if (converter == null) return _get<T>(sessionKey.key);
return converter(await _get<Y>(sessionKey.key));
}