copyWith method

Country copyWith({
  1. String? name,
  2. String? isoCode,
  3. Continent? continent,
  4. List<Language>? languages,
  5. List<Currency>? currencies,
  6. String? dialCode,
  7. String? phonePattern,
  8. String? zipCodePattern,
  9. List<String>? timezones,
  10. String? flagAssetPath,
})

Implementation

Country copyWith({
  String? name,
  String? isoCode,
  Continent? continent,
  List<Language>? languages,
  List<Currency>? currencies,
  String? dialCode,
  String? phonePattern,
  String? zipCodePattern,
  List<String>? timezones,
  String? flagAssetPath,
}) {
  return Country(
    name: name ?? this.name,
    isoCode: isoCode ?? this.isoCode,
    continent: continent ?? this.continent,
    languages: languages ?? this.languages,
    currencies: currencies ?? this.currencies,
    dialCode: dialCode ?? this.dialCode,
    phonePattern: phonePattern ?? this.phonePattern,
    zipCodePattern: zipCodePattern ?? this.zipCodePattern,
    timezones: timezones ?? this.timezones,
    flagAssetPath: flagAssetPath ?? this.flagAssetPath,
  );
}