Skip to content

No example for BottomSheet search #6290

Closed
flutter/website
#287

Description

@sethladd

From our material design catalog page, I tried to find examples of "BottomSheet" and came up empty: https://github.com/flutter/flutter/search?utf8=%E2%9C%93&q=path%3Aexamples+%22new+BottomSheet%22&type=Code

  1. Do we have example of BottomSheet, and is GitHub's search not finding it?

  2. Can we add examples of BottomSheets? :)

Thanks!

Activity

  1. sethladd commented on Oct 12, 2016

    @sethladd
    ContributorAuthor
  2. abarth commented on Oct 12, 2016

    @abarth
    Contributor

    BottomSheet isn't a thing you use on its own. There are persistent bottom sheets (see https://docs.flutter.io/flutter/material/ScaffoldState/showBottomSheet.html) and modal bottom sheets (see https://docs.flutter.io/flutter/material/showModalBottomSheet.html) that are how you typically use this.

    The docs on https://docs.flutter.io/flutter/material/BottomSheet-class.html try to explain this situation.

  3. HansMuller commented on Oct 12, 2016

    @HansMuller
    Contributor

    The gallery has persistent and modal bottom sheet demos. They're

    examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart
    examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart

  4. InMatrix commented on Oct 12, 2016

    @InMatrix

    Thanks for the pointers, @HansMuller. I'll update the page to correct the query.

  5. sethladd commented on Oct 12, 2016

    @sethladd
    ContributorAuthor

    Thanks all!
    On Wed, Oct 12, 2016 at 15:06 Tao Dong [email protected] wrote:

    Thanks for the pointers, @HansMuller https://github.com/HansMuller.
    I'll update the page to correct the query.

    —
    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub
    #6290 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AAAVZ_ZWm3C_msM9MfXUwgBeR6he1Gn8ks5qzVnvgaJpZM4KVM9z
    .

  6. johnfesa commented on May 25, 2018

    @johnfesa

    I'd like to add a note that persistent_bottom_sheet_demo.dart isn't really representative of how the Material spec demonstrates persistent bottom sheets working, and I'd recommend reworking the demo or improving the APIs to show a more typical use-case. The Material spec now refers to persistent bottom sheets them as "standard bottom sheets", in opposition to "modal bottom sheets". The main difference is that persistent bottom sheets are permanent fixtures of the screen (although the contents may change over time) so they should not be dismissible by default. They also seemingly can exist at the instant a page appears, rather than appearing later. The APIs aren't well-suited for this use-case; Scaffold has a number of constructor parameters where the user can provide widgets that persist for the lifetime of the scaffold, yet not a persistent bottom sheet (which should also persist for the lifetime of the scaffold). A persistent bottom sheet can only be created after Scaffold creation by manipulating ScaffoldState, which feels unergonomic.

  7. HansMuller commented on May 29, 2018

    @HansMuller
    Contributor

    I agree that it would make sense to provide a way to create a scaffold with a persistent ("standard") bottom sheet. I'll open a separate issue for that.

    #17998

  8. b-cancel commented on Jul 19, 2018

    @b-cancel

    After noticing the limitations of the implementation of material sheets (modal and persistent) I decided to create my own here https://github.com/b-cancel/Flutter_MaterialSheetAndNavigationDrawer
    it has tons of options and very easy to use
    I hope it helps!

  9. github-actions commented on Sep 2, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions