Open bl1nch opened 1 month ago
Example of sticky footer:
import flet as ft
def main(page: ft.Page):
page.padding = ft.Padding(10, 10, 10, 0) # remove the bottom padding
page.add(
ft.Column(
[
ft.ListTile(
title=ft.Text(f"Item {i}"),
bgcolor=ft.colors.GREEN_ACCENT_400,
)
for i in range(50)
],
scroll=ft.ScrollMode.ALWAYS,
expand=True,
),
ft.ListTile(title=ft.Text("I stick to the bottom!"), bgcolor=ft.colors.BLUE),
)
ft.app(main)
Example of sticky footer:
import flet as ft def main(page: ft.Page): page.padding = ft.Padding(10, 10, 10, 0) # remove the bottom padding page.add( ft.Column( [ ft.ListTile( title=ft.Text(f"Item {i}"), bgcolor=ft.colors.GREEN_ACCENT_400, ) for i in range(50) ], scroll=ft.ScrollMode.ALWAYS, expand=True, ), ft.ListTile(title=ft.Text("I stick to the bottom!"), bgcolor=ft.colors.BLUE), ) ft.app(main)
Sorry but that's not exactly what I meant. Sticky footer should also scroll with the content in the column if there is not enough free space on the page, and should only stick to the bottom if there is free space between the content in the column and the footer
Duplicate Check
Describe the requested feature
It is not possible to create a widget that will snap to the end of the page if the height of the page content is less than the height of the window, but will also scroll with the content if there is not enough space.
This issue occurs because any
Control
withexpand = true
in ascrollable Column
becomes infinite.Example in Flutter: https://pub.dev/packages/sticky_footer_scrollview
Suggest a solution
No response
Screenshots
Additional details
No response