Registry class abstract
Defines the contract for dependency registration.
- Available extensions
Constructors
- Registry()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allowReassignment(
{required bool allow}) → void - Controls whether registered singletons can be overridden. Typically used internally for mocking support.
-
call<
T extends Object> ({String? instanceName}) → T -
Retrieves an instance of a registered object
T(shorthand for get). -
get<
T extends Object> ({String? instanceName}) → T -
Retrieves an instance of a registered object
T. -
isRegistered<
T extends Object> ({String? instanceName}) → bool -
Checks if a type
Tis currently registered in the container. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerFactory<
T extends Object> (T factoryFunction(Registry i), {String? instanceName}) → void - Registers a Factory.
-
registerLazySingleton<
T extends Object> (T factoryFunction(Registry i), {String? instanceName}) → void - Registers a Lazy Singleton.
-
registerRoute(
RouteBase route) → void -
Available on Registry, provided by the RegistryExtension extension
Function that allows you to register A route that will be available to navigate later through the navigation api -
registerSingleton<
T extends Object> (T factoryFunction(Registry i), {String? instanceName}) → void - Registers a Singleton.
-
resetLazySingleton<
T extends Object> ({T? instance, String? instanceName, void disposingFunction(T)?}) → void - Resets a Lazy Singleton, allowing it to be recreated on the next request.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T extends Object> ({T? instance, String? instanceName, void disposingFunction(T)?}) → void -
Unregisters an instance of a registered object
T.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited