get<T> method
The value of key as T, or null when missing, expired or of another type.
Numbers convert between int and double; JSON lists read as List<String> when asked.
Implementation
T? get<T>(String key) {
final Object? value = _read(key);
return value == null ? null : _cast<T>(key, value);
}