ExpandedComponent
Closed this issue · 2 comments
livtanong commented
Problem to solve
RowLayout and ColumnLayout have no way to selectively make some of its children expand to fill up remaining space.
Proposal
- Under
_layoutMainAxisImpl, look for direct children of typeExpandedComponent. - Solve for available expandable space by summing the mainAxis lengths of non-ExpandedComponent children
- Divide the expandable space among all
ExpandedComponents, and size them to their corresponding spaces. ExpandedComponentsubclassesPaddingComponent(or some common superclass) withshrinkWrapset to false, so that setting its size also sets its child size automatically.
More information
No response
Other
- Are you interested in working on a PR for this?
spydon commented
Sounds good, but I don't think this should be related to the padding component, since this is a margin and not padding. We should maybe redesign the MarginComponent.
livtanong commented
I guess that's fine. The reason I brought up PaddingComponent was because of the behavior I described in item 5 of the proposal. But since item 5 is being contested for PaddingComponent, and that behavior is required for this, I can just implement it specifically for ExpandedComponent.