hasService<T extends Object> function

bool hasService<T extends Object>({
  1. String? id,
})

Returns whether a service is registered with the locator.

Implementation

bool hasService<T extends Object>({String? id}) {
  return _locator.isRegistered<T>(instanceName: id);
}