isRegisteredIn method

bool isRegisteredIn(
  1. LevitScope scope, {
  2. String? tag,
})

Checks whether this store is registered in scope.

Returns true when registration metadata exists, even if not instantiated.

Implementation

bool isRegisteredIn(LevitScope scope, {String? tag}) {
  final instanceKey =
      tag != null ? 'ls_store_${_getStoreTag(this, tag)}' : _defaultKey;
  return scope.isRegistered<_LevitStoreInstance<T>>(tag: instanceKey);
}