put<T> function

T put<T>(
  1. T any()
)

Implementation

T put<T>(T Function() any) {
  if (!exists<T>()) {
    _injector.registerSingleton<T>(any);
  }
  return get<T>();
}