put<T> method

T put<T>(
  1. T instance, {
  2. String? tag,
  3. bool? permanent,
})

Register an existing instance

Implementation

T put<T>(T instance, {String? tag, bool? permanent}) {
  if (ZenConfig.enableDebugLogs) {
    ZenLogger.logDebug('Putting $T instance in test container');
  }

  return _scope.put<T>(
    instance,
    tag: tag,
    isPermanent: permanent ?? false,
  );
}