Remove copy_with_extension dependency#64
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the copy_with_extension/copy_with_extension_gen dependency pair from leancode_kratos_client by replacing the single generated copyWith(...) usage with a small hand-written helper on AuthFlowDto, and bumps the package version accordingly.
Changes:
- Drop
copy_with_extensionfrom dependencies andcopy_with_extension_genfrom dev dependencies. - Replace the single
copyWith(sessionTokenExchangeCode: ...)call with a manualcopyWithSessionTokenExchangeCode(...)method. - Update generated output (
auth_dtos.g.dart), version, and changelog for0.8.1.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Removes copy_with_extension* deps and bumps package version to 0.8.1. |
| lib/src/kratos_client.dart | Switches to the new manual DTO helper for updating sessionTokenExchangeCode. |
| lib/src/common/api/auth_dtos.dart | Removes @CopyWith and introduces copyWithSessionTokenExchangeCode(...). |
| lib/src/common/api/auth_dtos.g.dart | Removes the previously generated CopyWith section; keeps JsonSerializable output. |
| CHANGELOG.md | Adds a 0.8.1 entry documenting the dependency removal. |
Files not reviewed (1)
- lib/src/common/api/auth_dtos.g.dart: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RobertOdrowaz
approved these changes
Jun 16, 2026
Albert221
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
copy_with_extensionhas been a major annoyance when moving between Flutter versions.leancode_kratos_clientused it once to modify one field – I think we can safely do it "manually".