registerSingleton<T extends Object> static method

void registerSingleton<T extends Object>(
  1. T value, {
  2. String? dependencyName,
})

Method used to register singleton dependency

Implementation

static void registerSingleton<T extends Object>(
  T value, {
  String? dependencyName,
}) {
  _instance._injector.registerSingleton(
    value,
    dependencyName: dependencyName,
  );
}