registerLazy<T extends Object> abstract method

void registerLazy<T extends Object>(
  1. T fn(), {
  2. String? name,
})

Registers a function that produces an instance of any Object type when called. The instance is created lazily, i.e., it is not created until it is required.

Implementation

void registerLazy<T extends Object>(T Function() fn, {String? name});