putLazy method

void putLazy(
  1. T factory(), {
  2. bool isPermanent = true,
})

Register a lazy factory

Implementation

void putLazy(T Function() factory, {bool isPermanent = true}) {
  if (scope != null) {
    scope!.putLazy<T>(factory, tag: tag, isPermanent: isPermanent);
  } else {
    Zen.putLazy<T>(factory, tag: tag, isPermanent: isPermanent);
  }
}