Skip to content

Sticky Footer ScrollView #3623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
bl1nch opened this issue Jul 9, 2024 · 2 comments
Open
1 task done

Sticky Footer ScrollView #3623

bl1nch opened this issue Jul 9, 2024 · 2 comments
Labels
feature request Suggestion/Request for additional feature

Comments

@bl1nch
Copy link
Contributor

bl1nch commented Jul 9, 2024

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 with expand = true in a scrollable Column becomes infinite.

Example in Flutter: https://pub.dev/packages/sticky_footer_scrollview

Suggest a solution

No response

Screenshots

demo1
demo3

Additional details

No response

@ndonkoHenri
Copy link
Contributor

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)

@bl1nch
Copy link
Contributor Author

bl1nch commented Jul 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggestion/Request for additional feature
Projects
None yet
Development

No branches or pull requests

2 participants