ServiceContainerException.duplicateRegistration constructor

ServiceContainerException.duplicateRegistration({
  1. required Type type,
  2. String? name,
})

Thrown when registering a type/name that's already bound.

Implementation

ServiceContainerException.duplicateRegistration({
  required this.type,
  this.name,
}) : message =
         "Duplicate registration of type($type)${name != null ? ' with name($name)' : ''}";