getStore<T> method

Store<T>? getStore<T>(
  1. String id
)

Get a store by ID

Implementation

Store<T>? getStore<T>(String id) {
  final store = _stores[id];
  if (store == null) {
    return null;
  }

  if (store is Store<T>) {
    return store;
  } else {
    developer.log('Store with ID $id is not of type Store<$T>', name: 'StoreRegistry');
    return null;
  }
}