Search packages, repositories and app categories

Package detailsv1.0.0

injecteo

Service locator for IoC pattern. Export annotations and abstract classes used by injecteo_generator.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
10
Likes
31
Pub points
150

Install package

flutter pub add injecteo

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Injecteo is a service locator designed for the Inversion of Control (IoC) pattern, enabling efficient dependency management in Flutter applications. It leverages annotations and abstract classes to generate boilerplate code via injecteo_generator, simplifying the registration and retrieval of dependencies. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it suitable for cross-platform development. By reducing manual dependency wiring, Injecteo enhances code maintainability and testability.

Use cases

  • Managing application-wide dependencies
  • Simplifying unit testing with mock dependencies
  • Enabling modular app architecture
  • Supporting dependency injection in large-scale apps
  • Facilitating separation of concerns in complex projects

Key features

  • Code generation via injecteo_generator
  • Annotations for dependency declaration
  • Abstract class support for flexible configuration
  • Cross-platform compatibility
  • Minimal runtime overhead

Suitable for

  • Large Flutter applications requiring structured dependency management
  • Teams using IoC patterns
  • Developers seeking automated dependency wiring
  • Projects emphasizing testability and modularity
  • Apps targeting multiple platforms

Considerations

  • Requires use of code generator (injecteo_generator)
  • Learning curve for new users unfamiliar with IoC
  • Potential complexity in debugging generated code
  • Dependency on correct annotation usage to avoid runtime errors

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

injecteo

melos   Test status   pub package   GitHub license  


Nice to see you here, dear Developer. This is a root of injecteo service locator / dependency injection generator project.
Repository contains several folders:

  • packages

    • injecteo: Dependency Injection annotations (@singleton, @inject, @InjectionModule, @externalModule), abstract class for ServiceLocator pattern and the implementation using get_it package
    • injecteo_generator: Actual code generator which scans project for injecteo annotations and generate top-level configuration function with additional InjectionModule classes
    • injecteo_models: Internal models used by generator. Represents DependencyConfig with required properties like:
      import name, type and implementation definition
  • example

    • basic: Simple counter app, which shows how to annotate classes for injecteo_generator and configure dependencies
    • feature_packages: Focuses on InjectionModule - a way to split features into multiple packages and integrate them with Melos
    • todeo: Advanced to-do application with multiple dependencies registered for dev and prod environments.

For details, please see each folder README files.

Development

Packages use Melos with usePubspecOverrides: true.
Local packages are linked via Melos-generated pubspec_overrides.yaml.

melos bs
melos run get
melos run generate
melos run format

Before commit

melos run format
melos run test

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package

No data available yet.