get<T> method

T? get<T>(
  1. String key, [
  2. T? defaultValue
])

Returns the value of the key from the storage if found, or defaultValue or null if not found

Implementation

T? get<T>(String key, [T? defaultValue]) {
  return _storage.containsKey(key) ? (_storage[key] as T) : defaultValue;
}