Skip to content

Dart implementation for service locator pattern

License

Notifications You must be signed in to change notification settings

exts/service_locator

 
 

Repository files navigation

Provides service locator pattern implementation for dart.

Usage

A simple usage example:

import 'package:service_locator/service_locator.dart';

main() {

  ServiceContainer container = ServiceContainer();
  container.add(AuthService());
  ServiceContainer scope = ServiceContainer(parent: container);
  scope.add(HttpService());


  AuthService authService = scope.get<AuthService>();
  HttpService httpService = scope.get<HttpService>();


}

About

Dart implementation for service locator pattern

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%