addSingleton<T> abstract method

void addSingleton<T>(
  1. Function constructor, {
  2. String? key,
})

Adds a singleton dependency that will be created once and reused.

Implementation

void addSingleton<T>(Function constructor, {String? key});