Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dio.clone #2095

Merged
merged 8 commits into from
Jan 29, 2025
Merged

Dio.clone #2095

merged 8 commits into from
Jan 29, 2025

Conversation

AlexV525
Copy link
Member

@AlexV525 AlexV525 commented Jan 11, 2024

Similar to copyWith, Dio.clone would be a handy method to let users create new instances with local or grouping usages.

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

@kuhnroyal
Copy link
Member

Independent of this PR, what do you think of making the Dio instance completely immutable in version 6?

@AlexV525
Copy link
Member Author

AlexV525 commented Jan 11, 2024

Independent of this PR, what do you think of making the Dio instance completely immutable in version 6?

Yeah I like the idea, and I'm also exploring the path. The thing is Dio's structure makes pieces nested, we cannot fluently use Dio in cases of grouping usage. So going immutable might be a better path to improve the overall usability and readability.

About the grouping usage, you can read this through translation: https://juejin.cn/post/7213356423811366949

@AlexV525 AlexV525 force-pushed the main branch 2 times, most recently from 4d616d5 to 6ad7313 Compare March 26, 2024 02:22
@AlexV525 AlexV525 marked this pull request as ready for review January 28, 2025 17:30
@AlexV525 AlexV525 requested a review from a team as a code owner January 28, 2025 17:30
Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
dio/lib/src/dio_mixin.dart 🟢 93.99% 🟢 94.14% 🟢 0.15%
Overall Coverage 🟢 84.74% 🟢 84.79% 🟢 0.05%

Minimum allowed coverage is 0%, this run produced 84.79%

@AlexV525 AlexV525 merged commit 10a8c0f into main Jan 29, 2025
2 of 3 checks passed
@AlexV525 AlexV525 deleted the feat/dio-clone branch January 29, 2025 05:47
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.

2 participants