Sitelet https://github.com/flutter/flutter/pull/188381
Skip to content

Fix SliverGeometry maxPaintExtent assertion in CarouselView.weighted - #188381

Closed
Mairramer wants to merge 4 commits into
flutter:masterfrom
Mairramer:fix-carousel-max-paint-extent
Closed

Mairramer wants to merge 4 commits into
flutter:masterfrom
Mairramer:fix-carousel-max-paint-extent

Conversation

@Mairramer

Copy link
Copy Markdown
Contributor

Fixes #188380

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages labels Jun 23, 2026

@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 _RenderSliverWeightedCarousel to set estimatedMaxScrollOffset when the last child index is reached, preventing a crash during manual scrolling when there are few children, and adds a regression test. The review feedback suggests unconditionally updating estimatedMaxScrollOffset to align with standard Flutter sliver layout behaviors instead of checking if it is not equal to infinity.

Comment thread packages/flutter/lib/src/material/carousel.dart Outdated
@Mairramer
Mairramer force-pushed the fix-carousel-max-paint-extent branch from 073e91c to 9ab8ac3 Compare June 23, 2026 14:12
@dkwingsmt
dkwingsmt requested a review from QuncCccccc June 24, 2026 18:18
@Piinks Piinks added the Decoupling: Not ready to port yet Instructions will be provided when this is ready to move to flutter/packages. label Jun 24, 2026
@Piinks

Piinks commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I've marked this PR as not ready to port to flutter/packages yet.
We'll provide instructions to move this change over to material_ui once it is ready to receive PRs. Thank you!

QuncCccccc
QuncCccccc previously approved these changes Jul 1, 2026

@QuncCccccc QuncCccccc 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! Thanks a lot for your contribution!

Comment thread packages/flutter/test/material/carousel_test.dart Outdated
@QuncCccccc QuncCccccc added the CICD Run CI/CD label Jul 1, 2026
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>

@QuncCccccc QuncCccccc 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

@QuncCccccc QuncCccccc added the CICD Run CI/CD label Jul 1, 2026

@justinmc justinmc 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 👍

@Piinks Piinks added the waiting for code freeze This PR is waiting for a code freeze to resolve. label Jul 15, 2026
@Piinks
Piinks marked this pull request as draft July 15, 2026 21:20
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Aug 23, 2026
@github-actions

Copy link
Copy Markdown

This pull request contains changes to Material or Cupertino, which are currently frozen in this repository.

Changes should be made in material_ui and/or cupertino_ui in the flutter/packages repository.

Please refer to #188444 for instructions.

@Mairramer

Mairramer commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Ported to flutter/packages#12563.

@Mairramer Mairramer closed this Aug 23, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Sep 7, 2026
…View.weighted (#12563)

Closes flutter/flutter#188380

Port of flutter/flutter#188381.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…View.weighted (flutter#12563)

Closes flutter/flutter#188380

Port of flutter/flutter#188381.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
victorsanni pushed a commit to victorsanni/packages that referenced this pull request Sep 9, 2026
…View.weighted (flutter#12563)

Closes flutter/flutter#188380

Port of flutter/flutter#188381.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Decoupling: Not ready to port yet Instructions will be provided when this is ready to move to flutter/packages. framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages waiting for code freeze This PR is waiting for a code freeze to resolve.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CarouselView.weighted throws SliverGeometry exception: maxPaintExtent is less than paintExtent

4 participants