getComputed<S, T> method

T? getComputed<S, T>(
  1. String id
)

Implementation

T? getComputed<S, T>(String id) {
  final storeType = typeOf<S>().toString();

  final localStorageForStore = _computedLocalStorage[storeType];
  if(localStorageForStore != null)
    return localStorageForStore[id] as T;

  final initialLocalStorageForStore = getStore<S>().getInitialValueForModule('computedModule');
  if(initialLocalStorageForStore != null)
    return initialLocalStorageForStore[id] as T;

  return null;
}