Injectable class

A metadata annotation used to mark a class as available to the dependency injection system.

This annotation can be applied to classes which should be instantiated or managed by the DI framework.

Marking a class with @Injectable indicates to the DI framework that an instance of the class can be created and provided to other parts of the application that require it.

Usage:

@Injectable()
class MyService {
  MyService();
}

The DI framework will then manage the lifecycle of the instantiated MyService objects, allowing for dependency management and injection into other classes that depend on MyService.

Constructors

Injectable()
Creates a new instance of Injectable.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited