copyWith method

  1. @override
Bind<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
Bind<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,
    alwaysSerialized: alwaysSerialized ?? this.alwaysSerialized,
    export: export ?? this.export,
    isLazy: isLazy ?? this.isLazy,
    isSingleton: isSingleton ?? this.isSingleton,
    selector: selector ?? this.selector,
    onDispose: onDispose ?? this.onDispose,
  );
}