copyWith method
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? name,
String? code,
String? codeShort,
List<String>? namesNative,
String? bibliographicCode,
NaturalLanguageFamily? family,
bool? isRightToLeft,
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,
);