When page.scroll is set, even to ft.ScrollMode.HIDDEN, page.vertical_alignment = ft.MainAxisAlignment.CENTER no longer centers page content vertically. The content remains horizontally centered, but it is positioned near the top of the page.
Originally reported on Discord.
Repro
import flet as ft
def main(page: ft.Page):
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
page.vertical_alignment = ft.MainAxisAlignment.CENTER
page.scroll = ft.ScrollMode.HIDDEN
page.add(ft.Text("Center"))
if __name__ == "__main__":
ft.run(main)
Expected behavior
The text should be centered both horizontally and vertically, matching behavior when page.scroll is not set.
Actual behavior
The text is centered horizontally, but appears near the top vertically.

When
page.scrollis set, even toft.ScrollMode.HIDDEN,page.vertical_alignment = ft.MainAxisAlignment.CENTERno longer centers page content vertically. The content remains horizontally centered, but it is positioned near the top of the page.Originally reported on Discord.
Repro
Expected behavior
The text should be centered both horizontally and vertically, matching behavior when
page.scrollis not set.Actual behavior
The text is centered horizontally, but appears near the top vertically.