lazySingleton<T extends Object> static method

Bind<T> lazySingleton<T extends Object>(
  1. T inject(
    1. Inject i
    ), {
  2. bool export = false,
})

Bind a 'Lazy Singleton' class. Built only when called the first time using Modular.get. The instance will always be the same.

Implementation

static Bind<T> lazySingleton<T extends Object>(T Function(Inject i) inject,
    {bool export = false}) {
  return Bind<T>(inject, isSingleton: true, isLazy: true, export: export);
}