isRegistered<S> static method

bool isRegistered<S>({
  1. dynamic key,
  2. String? tag,
})

Whether type S is registered in the current or any parent scope.

Implementation

static bool isRegistered<S>({dynamic key, String? tag}) {
  if (key is LevitState) {
    return key.isRegisteredIn(Ls.currentScope, tag: tag);
  }
  return Ls.isRegistered<S>(tag: tag);
}