copyWith method

CountryInfo copyWith({
  1. String? countryCode,
  2. String? name,
  3. String? englishName,
  4. String? flagEmoji,
  5. bool? isHidden,
  6. List<String>? callingCodes,
  7. dynamic extra,
  8. int? clientId,
})

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,
  String? flagEmoji,
  bool? isHidden,
  List<String>? callingCodes,
  dynamic extra,
  int? clientId,
}) => CountryInfo(
  countryCode: countryCode ?? this.countryCode,
  name: name ?? this.name,
  englishName: englishName ?? this.englishName,
  flagEmoji: flagEmoji ?? this.flagEmoji,
  isHidden: isHidden ?? this.isHidden,
  callingCodes: callingCodes ?? this.callingCodes,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);