Add fit and flex controls to MaxGap and refine gap layout behavior#29
Open
Sadoge wants to merge 2 commits into
Open
Add fit and flex controls to MaxGap and refine gap layout behavior#29Sadoge wants to merge 2 commits into
fit and flex controls to MaxGap and refine gap layout behavior#29Sadoge wants to merge 2 commits into
Conversation
- Default crossAxisExtent to 0 instead of null in RenderGap. - Add a fit parameter to MaxGap to support FlexFit.tight. - Optimize painting by reusing Paint objects in RenderGap and RenderSliverGap. - Update documentation and tests to reflect these changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve gap cross-axis handling and add
fit/flexcontrols toMaxGapSummary
This PR improves
Gap/MaxGaplayout behavior and expandsMaxGap's Flex configurability without breaking existing usage.It includes the earlier refactor around
crossAxisExtentandMaxGap.fit, plus the follow-up change from issue #17 to add a configurableflexparameter toMaxGap.Changes
crossAxisExtentas0by default before constraints are applied.fittoMaxGapso it can opt intoFlexFit.tight.flextoMaxGap, defaulting to1to preserve current behavior.fitandflexto the internalFlexible.MaxGap(24)source-compatible.Paintobjects inRenderGapandRenderSliverGap.Behavior
MaxGapbehavior remains unchanged by default.MaxGapnow supports custom Flex distribution when multiple gaps are used together.GapandMaxGapcontinue to shrink correctly when constrained.Tests
Added and updated tests covering:
GapandSliverGapMaxGap.fitMaxGap.flexforwardingMaxGaps with differentflexvaluesMaxGapbehavior