Skip to content

Conversation

@Turskyi
Copy link

@Turskyi Turskyi commented Jan 25, 2026

Added a copyWith method to UserFeedback class for creating modified copies of instances.

📜 Description

This change adds a copyWith method to the UserFeedback class, allowing
creation of modified copies of an existing instance.

The constructor was also marked as const, enabling compile-time
instantiation when possible. Both changes are additive and backward-compatible.

💡 Motivation and Context

UserFeedback is effectively an immutable data container. Adding a copyWith
method makes it easier to derive modified versions of an existing instance
without manually copying all fields.

This follows common Flutter and Dart patterns for immutable model classes and
improves ergonomics when extending or transforming feedback data.

💚 How did you test it?

The change is purely additive and does not affect existing behavior.

The copyWith method was verified manually to ensure:

  • Provided parameters correctly override existing values
  • Omitted parameters retain their original values

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

None. This change is self-contained and does not require follow-up work.

Added a copyWith method to UserFeedback class for creating modified copies of instances.
@Turskyi Turskyi requested a review from ueman as a code owner January 25, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant