copyWith method

ApiGenerationConfig copyWith({
  1. String? apiName,
  2. String? featureName,
  3. String? pageName,
  4. String? method,
  5. String? pathPage,
  6. String? projectName,
  7. String? returnData,
  8. String? appsName,
  9. String? pathUrl,
  10. String? headerPath,
  11. bool? json2dart,
  12. bool? bodyList,
  13. bool? responseList,
  14. CacheStrategy? cacheStrategy,
  15. int? ttl,
  16. bool? keepExpiredCache,
})

Creates a copy of this configuration with the given fields replaced with the new values.

Implementation

ApiGenerationConfig copyWith({
  String? apiName,
  String? featureName,
  String? pageName,
  String? method,
  String? pathPage,
  String? projectName,
  String? returnData,
  String? appsName,
  String? pathUrl,
  String? headerPath,
  bool? json2dart,
  bool? bodyList,
  bool? responseList,
  CacheStrategy? cacheStrategy,
  int? ttl,
  bool? keepExpiredCache,
}) {
  return ApiGenerationConfig(
    apiName: apiName ?? this.apiName,
    featureName: featureName ?? this.featureName,
    pageName: pageName ?? this.pageName,
    method: method ?? this.method,
    pathPage: pathPage ?? this.pathPage,
    projectName: projectName ?? this.projectName,
    returnData: returnData ?? this.returnData,
    appsName: appsName ?? this.appsName,
    pathUrl: pathUrl ?? this.pathUrl,
    headerPath: headerPath ?? this.headerPath,
    json2dart: json2dart ?? this.json2dart,
    bodyList: bodyList ?? this.bodyList,
    responseList: responseList ?? this.responseList,
    cacheStrategy: cacheStrategy ?? this.cacheStrategy,
    ttl: ttl ?? this.ttl,
    keepExpiredCache: keepExpiredCache ?? this.keepExpiredCache,
  );
}