hasService<T extends Object> function
Returns whether a service is registered with the locator.
Implementation
bool hasService<T extends Object>({String? id}) {
return _locator.isRegistered<T>(instanceName: id);
}