copyWith method

NaturalLanguage copyWith({
  1. String? bibliographicCode,
  2. String? code,
  3. String? codeShort,
  4. NaturalLanguageFamily? family,
  5. bool? isRightToLeft,
  6. String? name,
  7. List<String>? namesNative,
  8. Set<Script>? scripts,
})

Creates a new instance of NaturalLanguage with updated properties.

The optional named parameters can be used to specify new values for the corresponding properties. If a named parameter is not provided, the corresponding property is copied from the original instance.

Example usage:

const english = LangEng();

final americanEnglish = english.copyWith(
  name: 'American English',
);

Implementation

NaturalLanguage copyWith({
  String? bibliographicCode,
  String? code,
  String? codeShort,
  NaturalLanguageFamily? family,
  bool? isRightToLeft,
  String? name,
  List<String>? namesNative,
  Set<Script>? scripts,
}) => NaturalLanguage(
  name: name ?? this.name,
  codeShort: codeShort ?? this.codeShort,
  namesNative: namesNative ?? this.namesNative,
  code: code ?? this.code,
  bibliographicCode: bibliographicCode ?? this.bibliographicCode,
  family: family ?? this.family,
  isRightToLeft: isRightToLeft ?? this.isRightToLeft,
  scripts: scripts ?? this.scripts,
);