RegisterSingleton class
Designates a singleton instance registration within the service locator.
Extends DependencyRegistration to include common identification and management attributes, specifically tailored for singleton instance registrations. This type ensures that a single instance of the service is used application-wide, preserving state and consistency.
- Inheritance
-
- Object
- DependencyRegistration
- RegisterSingleton
Constructors
- RegisterSingleton({String? name, dynamic key, String? environment})
-
Establishes a singleton instance registration with customizable attributes.
const
Properties
- environment → String?
-
The environment tag associated with the registration, if provided.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → dynamic
-
The key associated with the registration, if provided.
no setterinherited
- name → String?
-
The name associated with the registration, if provided.
no setterinherited
- 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited