ProviderException.duplicateRegistration constructor

ProviderException.duplicateRegistration({
  1. required Type type,
  2. StackTrace? trace,
})

Thrown when a provider is registered more than once.

Example:

throw ProviderException.duplicateRegistration(type: MyProvider);

Implementation

factory ProviderException.duplicateRegistration({
  required Type type,
  StackTrace? trace,
}) {
  return ProviderException(
    type: type,
    message: 'Duplicate provider registration of $type',
    trace: trace,
  );
}