deleteByKey method

  1. @override
void deleteByKey(
  1. String key
)

delete a dependency from the container by the key

Implementation

@override
void deleteByKey(String key) {
  if (containsKey(key: key)) {
    container.remove(key);
  } else {
    throw 'key $key is not registered';
  }
}