Locator class abstract
Interface for dependency injection container Provides type-safe access to services with export restrictions
Constructors
- Locator()
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
-
allReady(
{Duration? timeout, bool ignorePendingAsyncCreation = false}) → Future< void> - Wait for all services to be ready
-
call<
T extends Object> ({String? instanceName, dynamic param1, dynamic param2}) → T - Call method for syntactic sugar (same as get)
-
get<
T extends Object> ({String? instanceName, dynamic param1, dynamic param2}) → T - Get a service instance
-
getAsync<
T extends Object> ({String? instanceName, dynamic param1, dynamic param2}) → Future< T> - Get a service instance asynchronously
-
isRegistered<
T extends Object> ({Object? instance, String? instanceName}) → bool - Check if a service is registered
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerFactory<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName}) → void - Register a factory function
-
registerLazySingleton<
T extends Object> (FactoryFunc< T> factoryFunc, {String? instanceName, DisposingFunc<T> ? dispose}) → void - Register a lazy singleton
-
registerSingleton<
T extends Object> (T instance, {String? instanceName, bool? signalsReady, DisposingFunc< T> ? dispose}) → void - Register a singleton instance
-
reset(
{bool dispose = true}) → Future< void> - Reset the container
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited