module top-level constant

Module const module

Annotates a class as a collection of providers for dependency injection.

A class annotated with module is an abstract class that can be used to assemble an object graph. Modules may extend or mixin other modules, or rely on composition to fill in dependencies.

Example:

@module
abstract class CarModule {
  @provide
  Car provideCar();
}

In this instance, a CarModule will know how to provide an instance of Car, given that all dependencies of Car are satisfied in the final object graph.

Implementation

const module = const Module._();