dart_service_locator library
Classes
- ServiceLocator
- A simple service locator for managing singleton and factory instances.
Functions
-
clear(
) → void - Shortcut to remove all dependencies.
-
create<
T> () → T -
Shortcut to create a new instance of type
T. -
locate<
T> () → T -
Shortcut to locate a singleton instance of type
T. -
register<
T> (T creator()) → void -
Shortcut to register a factory function for creating instances of type
T. -
remove<
T> () → void -
Shortcut to remove the singleton instance of type
T.