Add configurable width for side menu and adjacent content (subwindow)#86
Open
max-anders wants to merge 4 commits intoJamalianpour:masterfrom
Open
Add configurable width for side menu and adjacent content (subwindow)#86max-anders wants to merge 4 commits intoJamalianpour:masterfrom
max-anders wants to merge 4 commits intoJamalianpour:masterfrom
Conversation
Owner
|
Hi @max-anders, thanks for your PR. |
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.
This update introduces a customContentWidth parameter to improve control over the width of the side menu and its adjacent content, specifically for handling the transition between collapsed and expanded states.
By default, the width is based on MediaQuery.of(context).size.width, but it can be customized for different layouts, particularly when using LayoutBuilder. This ensures a smoother and more predictable transition between states.
🔹 Changes & Improvements
Added customContentWidth to define the width for both the side menu and adjacent content.
Helps resolve issues where the transition between collapsed and expanded states was inconsistent due to full-screen width calculations.
Defaults to MediaQuery but allows custom values to fit within constrained layouts (e.g., when placed inside a Row).
Works seamlessly with LayoutBuilder.maxWidth for better responsiveness.
📌 Usage Example
When using the widget normally:
For better adaptability inside a constrained layout:
This ensures that the side menu and its adjacent content correctly adjust within flexible layouts rather than relying on the full screen width.