copyWith method
SuggestedPostInfo
copyWith({
- SuggestedPostPrice? price()?,
- int? sendDate,
- SuggestedPostState? state,
- bool? canBeApproved,
- bool? canBeDeclined,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
SuggestedPostInfo copyWith({
SuggestedPostPrice? Function()? price,
int? sendDate,
SuggestedPostState? state,
bool? canBeApproved,
bool? canBeDeclined,
}) => SuggestedPostInfo(
price: price != null ? price() : this.price,
sendDate: sendDate ?? this.sendDate,
state: state ?? this.state,
canBeApproved: canBeApproved ?? this.canBeApproved,
canBeDeclined: canBeDeclined ?? this.canBeDeclined,
);