removeRegistrationIfExists<T extends Object> method

void removeRegistrationIfExists<T extends Object>({
  1. String? instanceName,
})

Implementation

void removeRegistrationIfExists<T extends Object>({String? instanceName}) {
  if (locator.isRegistered<T>(instanceName: instanceName)) {
    locator.unregister<T>(instanceName: instanceName);
  }
}