copyWith method

  1. @override
BindContract<T> copyWith({
  1. T factoryFunction(
    1. Injector i
    )?,
  2. bool? isSingleton,
  3. bool? isLazy,
  4. bool? export,
  5. bool? isScoped,
  6. bool? alwaysSerialized,
  7. void onDispose(
    1. T value
    )?,
  8. dynamic selector(
    1. T value
    )?,
})

Implementation

@override
BindContract<T> copyWith({
  T Function(Injector i)? factoryFunction,
  bool? isSingleton,
  bool? isLazy,
  bool? export,
  bool? isScoped,
  bool? alwaysSerialized,
  void Function(T value)? onDispose,
  Function(T value)? selector,
}) {
  return Bind<T>(
    factoryFunction ?? this.factoryFunction,
    export: export ?? this.export,
    isLazy: isLazy ?? this.isLazy,
    isScoped: isScoped ?? this.isScoped,
    isSingleton: isSingleton ?? this.isSingleton,
  );
}