copyWith method
Create a copy with optional field overrides
Implementation
Country copyWith({
String? dialCode,
String? displayCC,
String? flag,
String? fullCountryCode,
int? minLength,
int? maxLength,
String? name,
String? regionCode,
String? pattern,
}) {
return Country(
code: code,
dialCode: dialCode ?? this.dialCode,
displayCC: displayCC ?? this.displayCC,
flag: flag ?? this.flag,
fullCountryCode: fullCountryCode ?? this.fullCountryCode,
minLength: minLength ?? this.minLength,
maxLength: maxLength ?? this.maxLength,
name: name ?? this.name,
regionCode: regionCode ?? this.regionCode,
pattern: pattern ?? this.pattern,
);
}