copyWith method

Town copyWith({
  1. required int id,
  2. required String name,
  3. required Town? region,
  4. required Country? country,
})

Implementation

Town copyWith({
  required int id,
  required String name,
  required Town? region,
  required Country? country,
}) =>
    Town(
      id: id,
      name: name,
      region: region ?? this.region,
      country: country ?? this.country,
    );