Skip to main content

Getting Started

Welcome to Dependy

A Lightweight and Flexible Dependency Injection Library for Dart.

Motivation

Managing dependencies in larger codebases can be complex, especially when different parts of the application rely on various services. Many DI libraries add unnecessary overhead or lack flexibility, making it challenging to build modular and testable code. Dependy aims to simplify this process, making it easier to maintain and scale your applications.

Solution

Introducing Dependy—a DI library focused on keeping your Dart code organized and easy to manage. Dependy provides a flexible, provider-based approach that helps you define how each service is created and manage dependencies between them.

Dependy includes key features like:

  • Provider-based DI: Define how each service (or provider) is created and set up dependencies.
  • Support for modules: Organize providers into modules to improve code separation and structure.
  • Circular dependency detection: Avoid issues by tracking dependencies and preventing infinite loops.
  • Async and Eager Initialization: Use asynchronous loading for efficient service initialization or prepare services eagerly as needed.

With Dependy, you get full control over your services and dependencies, making it easier to build, maintain, and scale your Dart applications. In the next sections, you'll find more details on how to use Dependy in your projects.