Skip to content

Fixes controller disposal logic - #299

Merged
cedvdb merged 3 commits into
cedvdb:mainfrom
xvrh:xha/fixdispose
Aug 26, 2025
Merged

Fixes controller disposal logic#299
cedvdb merged 3 commits into
cedvdb:mainfrom
xvrh:xha/fixdispose

Conversation

@xvrh

@xvrh xvrh commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

The PR #298 introduced a bug when we provide a PhoneController. The widget should only dispose the controller if it was created internally.

cc @kosratdev

Checklist

  • I have bumped the version in pubspec.yaml
  • I have added an entry in changelog.md for the new pubspec version
  • (if applicable) I have added "Closes #1234" to this termplate to automatically close related issues.
  • (not required if no sensible change has been made eg: Localization) I have added tests that prove my fix is effective or that my feature works.

xvrh added 3 commits August 26, 2025 12:43
Ensures that the internal `TextEditingController` is only disposed of when it's not provided externally.
This prevents errors when the user provides their own controller.

Adds tests to verify the correct disposal behavior.
@kosratdev

Copy link
Copy Markdown
Contributor

Thank you very much @xvrh for this PR. I was about to open a new PR to solve this problem, but you already did it 👏

@kosratdev kosratdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cedvdb
cedvdb merged commit 3f703ad into cedvdb:main Aug 26, 2025
1 check passed
@cedvdb

cedvdb commented Aug 26, 2025

Copy link
Copy Markdown
Owner

Thanks !

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.

3 participants