copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
CountryInfo copyWith({
String? countryCode,
String? name,
String? englishName,
bool? isHidden,
List<String>? callingCodes,
}) =>
CountryInfo(
countryCode: countryCode ?? this.countryCode,
name: name ?? this.name,
englishName: englishName ?? this.englishName,
isHidden: isHidden ?? this.isHidden,
callingCodes: callingCodes ?? this.callingCodes,
);