ServiceAlreadyRegisteredException class

This exception is thrown when you try to register a service with the same name twice.

To fix, ensure the service is unique or use a different key for this one (note that the service name is the service class name, so two classes with the same name but from different packages are considered equal, thus, requiring a non null serviceKey argument to differentate them)

Implemented types

Constructors

ServiceAlreadyRegisteredException({required String serviceKey, required bool asSingleton})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited