copyWith method

ToggleGiftIsSaved copyWith({
  1. String? receivedGiftId,
  2. bool? isSaved,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ToggleGiftIsSaved copyWith({String? receivedGiftId, bool? isSaved}) =>
    ToggleGiftIsSaved(
      receivedGiftId: receivedGiftId ?? this.receivedGiftId,
      isSaved: isSaved ?? this.isSaved,
    );