You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RenderFlex should not use defaultComputeDistanceToFirstActualBaseline to calculate its baseline in Axis.vertical #145739
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
Returns the distance from the y-coordinate of the position of the box to the y-coordinate of the first given baseline in the box's contents, if any, or null otherwise.
How do I interpret "the first given baseline" here? For multi-child containers, does it mean "the baseline with the smallest y-offset"?
(It's definitely not automatically the one with the smallest y-offset, in fact that's often the wrong child (for example consider a stack). It's also not always the first child that you want, for example a Material text field explicitly doesn't want to use the label for its baseline, since that moves around; it wants to use the user-editable text in the text field.)
There doesn't seem to be a fast & easy remedy for that besides writing a custom RenderObject? Does it sound reasonable to introduce a ParentDataWidget to specify the baseline child then (I think we are allowed to have more than one ParentDataWidget on a render object now)?
Ah so if I have a column with VerticalDirection.up, the expected behavior is to use the bottom-most child with a baseline?
I mean honestly at this point given how much content exists that depends on this, I would say the expected behaviour is probably whatever we do. If we change it, we're going to break people in really subtle ways.
There doesn't seem to be a fast & easy remedy for that besides writing a custom RenderObject?
The IgnoreBaseline widget is the usual remedy, but in general, writing a custom RenderObject is probably the way to go if you care about the layout and baseline positions and so on.
Does it sound reasonable to introduce a ParentDataWidget to specify the baseline child then (I think we are allowed to have more than one ParentDataWidget on a render object now)?
I'm not sure what problem we're trying to solve here so it's hard for me to evaluate.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
huycozy commentedon Mar 26, 2024
Hi @LongCatIsLooong
RenderFlowBaselineTestBoxis not defined. Could you also share it?github-actions commentedon Apr 16, 2024
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Apr 30, 2024
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
LongCatIsLooong commentedon May 23, 2024
@Hixie in a vertical
RenderFlexwithVerticalDirection.up, which child's baseline should be used? The documentation ofcomputeDistanceToActualBaselinesays itHow do I interpret "the first given baseline" here? For multi-child containers, does it mean "the baseline with the smallest y-offset"?
Hixie commentedon May 23, 2024
If I recall correctly, the "first child" is intended to be the first one in the child list (the one that
firstChildpoints to).Hixie commentedon May 23, 2024
(It's definitely not automatically the one with the smallest y-offset, in fact that's often the wrong child (for example consider a stack). It's also not always the first child that you want, for example a Material text field explicitly doesn't want to use the label for its baseline, since that moves around; it wants to use the user-editable text in the text field.)
LongCatIsLooong commentedon May 23, 2024
Ah so if I have a column with
VerticalDirection.up, the expected behavior is to use the bottom-most child with a baseline?Stacks do use the highest baseline it seems: https://api.flutter.dev/flutter/rendering/RenderStack/computeDistanceToActualBaseline.html
LongCatIsLooong commentedon May 23, 2024
There doesn't seem to be a fast & easy remedy for that besides writing a custom RenderObject? Does it sound reasonable to introduce a ParentDataWidget to specify the baseline child then (I think we are allowed to have more than one
ParentDataWidgeton a render object now)?Hixie commentedon May 23, 2024
I mean honestly at this point given how much content exists that depends on this, I would say the expected behaviour is probably whatever we do. If we change it, we're going to break people in really subtle ways.
Heh, figures. :-)
The
IgnoreBaselinewidget is the usual remedy, but in general, writing a customRenderObjectis probably the way to go if you care about the layout and baseline positions and so on.I'm not sure what problem we're trying to solve here so it's hard for me to evaluate.
LongCatIsLooong commentedon May 23, 2024
Ah clever. Thanks I'll close this then.
Fix the RenderFlex.computeDryBaseline implementation to match compute…
Fix the RenderFlex.computeDryBaseline implementation to match compute…
github-actions commentedon Jun 6, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.