Skip to content
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

Ability to expand ButtomSheet to the top of the screen #2087

Closed
1 task done
FeodorFitsner opened this issue Nov 14, 2023 Discussed in #2074 · 2 comments
Closed
1 task done

Ability to expand ButtomSheet to the top of the screen #2087

FeodorFitsner opened this issue Nov 14, 2023 Discussed in #2074 · 2 comments
Milestone

Comments

@FeodorFitsner
Copy link
Contributor

Discussed in #2074

Originally posted by Klu1d November 12, 2023

Question

"ButtomSheet" turned out to be a very successful control element for me. But what I lack in it is the ability to fill the entire screen with this control. For example, as in the images I attached. Or as, for example, "Container (expand=True)". The "ButtonSheet" itself does not have properties such as "expand" or "height" and "width", is it possible to implement this somehow or make at least a temporary solution? So that I can expand the "ButtomSheet" to full screen. Because I can't do it
Снимок экрана от 2023-11-12 23-48-34
Снимок экрана от 2023-11-12 23-43-46

Code sample

import flet as ft

def main(page: ft.Page):
    def bs_dismissed(e):
        print("Dismissed!")

    def show_bs(e):
        bs.open = True
        bs.update()

    def close_bs(e):
        bs.open = False
        bs.update()

    bs = ft.BottomSheet(
        ft.Container(
            ft.Column(
                [
                    ft.Text("This is sheet's content!"),
                    ft.ElevatedButton("Close bottom sheet", on_click=close_bs),
                ],
                tight=True,
            ),
            height=500,
            width=300,
            expand=True,
            padding=10,
        ),
        open=True,
        enable_drag=True,
        on_dismiss=bs_dismissed,
    )
    page.overlay.append(bs)
    page.add(ft.SafeArea(
        ft.ElevatedButton("Display bottom sheet", on_click=show_bs)
    ))

ft.app(target=main)

Error message

No response

------------------------------------------------------

  • I have searched for answers to my question both in the issues and in previous discussions.
@FeodorFitsner FeodorFitsner added status: working on it Working on a fix for the issue done and removed status: working on it Working on a fix for the issue labels Nov 14, 2023
@FeodorFitsner FeodorFitsner added this to the Flet v0.12.1 milestone Nov 14, 2023
FeodorFitsner added a commit that referenced this issue Nov 14, 2023
Allows expanding bottom sheet on the entire screen.
Close #2087
@Klu1d
Copy link

Klu1d commented Nov 16, 2023

I tested the "ButtomSheet" from 0.12.1, everything works fine in desktop and web applications. That's just when testing on a mobile device (iOS), the original problem remains. The first image is a desktop application, the second is a mobile one.
desktop
mobile

@FeodorFitsner
Copy link
Contributor Author

Flet for mobile app update is needed. Working on it.

zrr1999 pushed a commit to zrr1999/flet that referenced this issue Jul 17, 2024
* Dismiss drawers on page change

* Fixed routing regression

Fix flet-dev#2082

* ViewControl

* Bottom sheet to use control state

Fix flet-dev#2075

* AnimatedTransitionPage

* Remove old animated pages

* Flet version bumped to 0.12.1

* Added `BottomSheet. is_scroll_controlled` property

Allows expanding bottom sheet on the entire screen.
Close flet-dev#2087

* Fixed: close currently opened AlertDialog before opening a new one

Fix flet-dev#1670

* Added `BottomSheet.maintain_bottom_view_insets_padding` property

Close flet-dev#2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants