Skip to content

[material_ui] Fix bottom sheet dismissal near minimum extent when shouldCloseOnMinExtent - #12392

Closed
kirya355 wants to merge 1 commit into
flutter:mainfrom
kirya355:main
Closed

kirya355 wants to merge 1 commit into
flutter:mainfrom
kirya355:main

Conversation

@kirya355

@kirya355 kirya355 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes bottom sheet dismissal when a DraggableScrollableNotification extent
is within floating-point precision of minExtent, instead of requiring exact
equality.

Updates both the modal BottomSheet and standard Scaffold bottom sheet
handlers. Adds regression tests for both paths using extent: 0.20000000001
and minExtent: 0.2.

Also bumps material_ui to 0.0.4 and updates its CHANGELOG.

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@google-cla

google-cla Bot commented Aug 7, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the bottom sheet dismissal logic in material_ui to trigger when the extent is within a floating-point precision tolerance of its minimum extent, accompanied by corresponding tests and a version bump to 0.0.4. The review feedback suggests that using the absolute difference may fail to trigger dismissal if a rapid drag or dropped frame causes the extent to jump past the minimum. It is recommended to check if the extent is less than or equal to the minimum extent plus the tolerance instead.

@Piinks

Piinks commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Hi @kirya355 thanks for contributing! This package is not accepting contributions yet, so I am going to close this PR. If you would like to open a PR against the material library in flutter/flutter, we will be letting folks know when we are ready for contributions there. Thanks!

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

Labels

p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants