-
Notifications
You must be signed in to change notification settings - Fork 644
Wrong behavior using both alignment & expand=False in Container #5209
Copy link
Copy link
Open
Description
Duplicate Check
- I have searched the opened issues and there are no duplicates
Describe the bug
Using alignment and expand=False in Container give me an unexpected result.
I want my Container not to expand.
In the following example, the first Container give me an expected result (without alignment).
Then, I want to align the text, and the second Container give me an expanded Container.
Is this normal ?
import flet as ft
def main(page: ft.Page):
page.add(
ft.Container(
ft.Column(
[
ft.Container( ft.Text("Hello"), expand=False, height=50, bgcolor='amber' ),
ft.Container( ft.Text("Hello"), expand=False, height=50, bgcolor='orange', alignment=ft.alignment.center_left ),
]
)
)
)
ft.app(target=main)
Code sample
see above
To reproduce
Execute sample code
Expected behavior
No response
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 11
Flet version
0.27.6
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]Additional details
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
👀 In review