Skip to content

Remove controller listener on CupertinoPicker dispose#111977

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
moffatman:picker_detach
Sep 20, 2022
Merged

Remove controller listener on CupertinoPicker dispose#111977
auto-submit[bot] merged 1 commit into
flutter:masterfrom
moffatman:picker_detach

Conversation

@moffatman

Copy link
Copy Markdown
Contributor

_RenderCupertinoPickerSemantics was forgetting to unsubscribe from ScrollController events upon dispose. It appeared as an error about !_debugDisposed upon reuse of that controller, which was misidentified as use of ScrollController after dispose, see #90123. In fact, the _RenderCupertinoPickerSemantics is the object which was used after dispose.

Fixes #110731

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels Sep 20, 2022

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CupertinoPicker disposes controller

2 participants