0

How to change the width of the controls in Flet once the page/window size is changed?

E.g. I have a container that is the same width as the page now:

container = ft.Container(content=ft.Text("this is a container"), width = page.width, height= page.height)

If I drag the edges of the window to change the page, the container's size won't change. How to change its size to as same as the window/page size once it is changed?

easonoob
  • 23
  • 5

1 Answers1

3

In this case, there is no need to set height and width just set expand=True

Container(
  ...,
  expand=True,
)