register<T extends Object> abstract method

void register<T extends Object>(
  1. T instance, {
  2. String? name,
})

Registers an instance of any Object type with the DI container.

The instance parameter is the object to be registered. Optionally, a name can be assigned to the instance for later retrieval.

Implementation

void register<T extends Object>(T instance, {String? name});