Inject<T>.future constructor

Inject<T>.future(
  1. Future<T> creationFutureFunction(), {
  2. dynamic name,
  3. bool isLazy = false,
  4. T? initialValue,
})

Implementation

factory Inject.future(
  Future<T> Function() creationFutureFunction, {
  dynamic name,
  bool isLazy = false,
  T? initialValue,
}) {
  return Inject._(
    ReactiveModel.create(
      creator: creationFutureFunction,
      initialState: initialValue,
    ),
    name,
  );
}