Skip to content

Conversation

@ss0314
Copy link

@ss0314 ss0314 commented Sep 11, 2025

Summary

This PR fixes critical unbounded layout errors that occur when using complex math widgets like \sqrt, and \left...\right inside layouts with unbounded vertical constraints, such as Column, ListView, or SingleChildScrollView.

The Problem

When a Math widget is placed in a vertically unbounded container, several internal components fail:

  1. RenderLine: Passes an infiniteConstraint to its children during the initial layout phase.
  2. FracNode & LeftRightNode: Their layout delegates (FracLayoutDelegate, LeftRightNode's buildWidget) are not designed to handle infinite height constraints passed from RenderLine. They attempt calculations with Infinity or null values, leading to exceptions like:
    • _RenderLayoutBuilderPreserveBaseline object was given an infinite size during layout.
    • Type errors during layout calculations.

@CLAassistant
Copy link

CLAassistant commented Sep 11, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ss0314
❌ dakshatsuraasa
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link

coderabbitai bot commented Sep 11, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ss0314 ss0314 changed the title Fix/unbounded layout errors Fix:unbounded layout errors Sep 11, 2025
@ss0314 ss0314 changed the title Fix:unbounded layout errors Fix: unbounded layout errors Sep 11, 2025
@woaiso
Copy link

woaiso commented Dec 4, 2025

You saved me time, thanks!

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants