copyWith method

CatalogConfig copyWith({
  1. int? version,
  2. String? langDir,
  3. CatalogFileFormat? format,
  4. String? fallbackLocale,
  5. String? sourceLocale,
  6. bool clearSourceLocale = false,
  7. String? stateFile,
  8. int? uiPort,
  9. int? apiPort,
  10. bool? openBrowser,
  11. String? arbFilePrefix,
  12. bool? hideCatalogUiKeys,
  13. bool? autoGenerateDictionary,
})

Implementation

CatalogConfig copyWith({
  int? version,
  String? langDir,
  CatalogFileFormat? format,
  String? fallbackLocale,
  String? sourceLocale,
  bool clearSourceLocale = false,
  String? stateFile,
  int? uiPort,
  int? apiPort,
  bool? openBrowser,
  String? arbFilePrefix,
  bool? hideCatalogUiKeys,
  bool? autoGenerateDictionary,
}) {
  return CatalogConfig(
    version: version ?? this.version,
    langDir: langDir ?? this.langDir,
    format: format ?? this.format,
    fallbackLocale: fallbackLocale ?? this.fallbackLocale,
    sourceLocale: clearSourceLocale ? null : (sourceLocale ?? this.sourceLocale),
    stateFile: stateFile ?? this.stateFile,
    uiPort: uiPort ?? this.uiPort,
    apiPort: apiPort ?? this.apiPort,
    openBrowser: openBrowser ?? this.openBrowser,
    arbFilePrefix: arbFilePrefix ?? this.arbFilePrefix,
    hideCatalogUiKeys: hideCatalogUiKeys ?? this.hideCatalogUiKeys,
    autoGenerateDictionary: autoGenerateDictionary ?? this.autoGenerateDictionary,
  );
}