Skip to content

Support for sheet presentation style #42560

Closed

Description

@markqq

Use case

Sheet

The sheet presentation style appears as a card that partially covers the underlying content and dims all uncovered areas to prevent interaction with them. The top edge of the parent view or a previous card is visible behind the current card to help people remember the task they suspended when they opened the card. People dismiss a card by:

  • Swiping down from the top of the screen
  • Swiping down from anywhere on the screen when card content is scrolled to the top
  • Tapping a button
  • Use a sheet for nonimmersive modal content that doesn’t enable a complex task.

image

https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/modality/#sheet

Proposal

Add sheet to CupertinoPageRoute class.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: new featureNothing broken; request for a new capability
    on Oct 12, 2019
  2. HansMuller commented on Oct 14, 2019

    @HansMuller
    Contributor
  3. justinmc commented on Oct 14, 2019

    @justinmc
    Contributor

    This is being tracked as a part of #35026, but I'll keep this issue open for specifics.

    I'm going to work on implementing this soon! It's good to see that there is a need for it.

  4. justinmc commented on Oct 17, 2019

    @justinmc
    Contributor

    This was brought up in #42894 under the name Modal Presentation. Also note that this is an iOS 13 feature.

  5. yurikots commented on Feb 2, 2020

    @yurikots

    @justinmc
    Hi. Do you know when this feature will be available?

  6. justinmc commented on Feb 11, 2020

    @justinmc
    Contributor

    I wanted to get this out, but unfortunately I can't work on this in the foreseeable future due to other priorities. If anyone else wants to take a crack at it I'd be happy to help out with advice and review. I know this is important for iOS apps.

  7. added
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Feb 12, 2020
  8. jamesdixon commented on Feb 12, 2020

    @jamesdixon

    @justinmc had you started this at all?

    FYI, there's also this, which appears to implement the presentation sheet style although I haven't tried it myself: https://pub.dev/packages/cupertino_stackview/

  9. justinmc commented on Feb 19, 2020

    @justinmc
    Contributor

    That's good to hear that there is a pub package, hopefully that will help a lot of people out. I looked into implementing it by modifying CupertinoPageRoute, but I never got beyond the exploration phase in my code.

  10. xster commented on Apr 30, 2020

    @xster
    Member

    Updated issue #43041

  11. jamesblasco commented on Jun 10, 2020

    @jamesblasco
    Contributor

    In case someone needs this, I've implemented a solution that works similar to the current Flutter modals.

    https://github.com/jamesblasco/modal_bottom_sheet.

    showCupertinoModalBottomSheet will display a new sheet-presentation-style modal.

    You will also have to change the previous route with a new MaterialWithModalsPageRoute, as
    unfortunately, MaterialPageRoute can only translate to a MaterialPageRoute or CupertinoPageRoute.

    Happy to help implementing this inside Flutter. Related issue #33798

  12. tomasdev commented on Aug 30, 2020

    @tomasdev

    Can we make @jamesblasco pkg an official thing?

  13. justinmc commented on Sep 3, 2020

    @justinmc
    Contributor

    The package looks great. We might want to de-duplicate some code around the styling of the menu items here and in CupertinoContextMenu (see the gifs in #37778).

    CC @xster for opinions on bringing this into Flutter

  14. 40 remaining items

  15. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Dec 19, 2023
  16. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Jan 10, 2024
  17. MitchellGoodwin commented on May 24, 2024

    @MitchellGoodwin
    Contributor

    We've made a design doc and a proof of concept PR focused on the route blockers. The design doc is at flutter.dev/go/cupertino-bottom-sheet-routes. It's still in the early phases of getting feedback, but a side product of this work is it will be easier to mix together having multiple different route transitions in one app.

  18. moved this to In Progress in Cupertino Refreshon Jul 25, 2024
  19. added a commit that references this issue on Jan 10, 2025
    50f7120
  20. moved this from In Progress to Done in Cupertino Refreshon Jan 10, 2025
  21. added a commit that references this issue on Jan 15, 2025
    4584429
  22. github-actions commented on Jan 25, 2025

    @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.

  23. locked as resolved and limited conversation to collaborators on Jan 25, 2025
  24. added
    c: new widgetMust also have "c: new feature". Request for a new widget.
    on Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: new widgetMust also have "c: new feature". Request for a new widget.customer: crowdAffects or could affect many people, though not necessarily a specific customer.frameworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagesteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions