ObjectFactoryFunction<T> typedef

ObjectFactoryFunction<T> = FutureOr<ObjectHolder<T>> Function([List<ArgumentValue>? args])

A function that creates an instance of type T.

This function is used by ObjectFactory to create instances of type T.

args: Optional arguments to pass to the creator function. Returns a FutureOr<ObjectHolder

Example:

final factory = ObjectFactory<String>(([args]) => ObjectHolder('test', packageName: 'test', qualifiedName: 'test'));

Implementation

typedef ObjectFactoryFunction<T> = FutureOr<ObjectHolder<T>> Function([List<ArgumentValue>? args]);