dart_service_locator 1.0.5 copy "dart_service_locator: ^1.0.5" to clipboard
dart_service_locator: ^1.0.5 copied to clipboard

A lightweight, flexible dependency injection solution for Flutter applications, supporting both synchronous and asynchronous dependency resolution with minimal boilerplate.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add dart_service_locator

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  dart_service_locator: ^1.0.5

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:dart_service_locator/dart_service_locator.dart';
0
likes
160
pub points
45%
popularity

Publisher

verified publisherdipendrasharma.com

A lightweight, flexible dependency injection solution for Flutter applications, supporting both synchronous and asynchronous dependency resolution with minimal boilerplate.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on dart_service_locator