modularity_contracts 0.0.2 copy "modularity_contracts: ^0.0.2" to clipboard
modularity_contracts: ^0.0.2 copied to clipboard

Zero-dependency interfaces and contracts for Modularity framework. Defines Binder, Module and other core abstractions.

modularity_contracts #

Zero-dependency interfaces for the Modularity framework.

This package defines the core contracts (Module, Binder, Disposable) used by modularity_core and other packages. It contains no implementation logic and has no dependencies, making it lightweight and easy to implement.

Usage #

Extend Module to define a feature module:

import 'package:modularity_contracts/modularity_contracts.dart';

class MyModule extends Module {
  @override
  void binds(Binder binder) {
    // Register dependencies
    binder.singleton(() => MyService());
  }
}
1
likes
160
points
119
downloads

Publisher

unverified uploader

Weekly Downloads

Zero-dependency interfaces and contracts for Modularity framework. Defines Binder, Module and other core abstractions.

Repository (GitHub)
View/report issues

Topics

#dependency-injection #di #interfaces #contracts

Documentation

API reference

License

MIT (license)

More

Packages that depend on modularity_contracts