unregisterService<T extends Object> function
Unregisters a service instance with the locator.
Implementation
void unregisterService<T extends Object>({
String? id,
FutureOr<void> Function(T service)? dispose,
}) {
if (hasService<T>(id: id)) {
_locator.unregister<T>(instanceName: id, disposingFunction: dispose);
}
}