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
Address copyWith({
String? countryCode,
String? state,
String? city,
String? streetLine1,
String? streetLine2,
String? postalCode,
}) =>
Address(
countryCode: countryCode ?? this.countryCode,
state: state ?? this.state,
city: city ?? this.city,
streetLine1: streetLine1 ?? this.streetLine1,
streetLine2: streetLine2 ?? this.streetLine2,
postalCode: postalCode ?? this.postalCode,
);