copyWith method

FetchlyConfig copyWith({
  1. int? connectTimeout,
  2. int? receiveTimeout,
  3. int? printLimit,
  4. int? headerLimit,
  5. bool? showHeader,
})

Creates a new instance of FetchlyConfig by copying the current instance and replacing specified values with new ones.

Returns a new FetchlyConfig instance with updated values. If a parameter is not provided, its value remains the same as in the current instance.

Implementation

FetchlyConfig copyWith(
    {int? connectTimeout,
    int? receiveTimeout,
    int? printLimit,
    int? headerLimit,
    bool? showHeader}) {
  return FetchlyConfig(
    connectTimeout: connectTimeout ?? this.connectTimeout,
    receiveTimeout: receiveTimeout ?? this.receiveTimeout,
    printLimit: printLimit ?? this.printLimit,
    showHeader: showHeader ?? this.showHeader,
    headerLimit: headerLimit ?? this.headerLimit,
  );
}