Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layoutWithoutSize.useSize not used #42

Open
Albert221 opened this issue Mar 2, 2025 · 1 comment
Open

layoutWithoutSize.useSize not used #42

Albert221 opened this issue Mar 2, 2025 · 1 comment

Comments

@Albert221
Copy link
Contributor

The useSize parameter on the BoxyChild.layoutWithoutSize is not used at all.

/// Like [layout] but does not return the child's size, this is usually more
/// efficient because the boxy doesn't need to be laid out when the child's
/// size changes.
///
/// If [useSize] is true, this boxy will re-layout when the child changes
/// size regardless.
///
/// See also:
///
/// * [layout], which does the same but returns a size.
/// * [layoutRect], which positions the child so that it fits in a rect.
/// * [layoutFit], which positions and scales the child given a [BoxFit].
void layoutWithoutSize(BoxConstraints constraints, {bool useSize = false}) {
if (_parent.isDryLayout) {
// Do nothing since the delegate doesn't need a size.
return;
}
_checkConstraints(constraints);
render.layout(constraints);
}

@pingbird
Copy link
Owner

pingbird commented Mar 3, 2025

Good catch! I think we should be passing that to the parentUsesSize parameter of render.layout

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

No branches or pull requests

2 participants