Skip to content

Implement CupertinoNavigationBar #7508

Closed

Description

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    p: cupertino_uicupertino_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    platform-iosiOS applications specifically
    on Jan 17, 2017
  2. self-assigned this
    on Jan 17, 2017
  3. modified the milestone: on Feb 7, 2017
  4. removed their assignment
    on Feb 21, 2017
  5. xster commented on May 17, 2017

    @xster
    Member

    Note to future self: content can slide under the navigation bar and be blurred

  6. xster commented on May 18, 2017

    @xster
    Member

    Further note to future self (from gitters), Ian suggests using a CustomScrollView and the nav bar in a sliver that's semi transparent and doesn't move to have the effect of the list scrolling under the nav bar and the nav bar being translucent and blurry.

  7. self-assigned this
    on May 24, 2017
  8. xster commented on May 24, 2017

    @xster
    Member

    Further further note to future self: the app bar needs a slot to hold #7509

  9. xster commented on May 24, 2017

    @xster
    Member

    Brain storming:

    I think whether the app bar is used with an iOS scaffold or not, it needs to be outside of the PageRoute/CupertinoPageTransition since it doesn't slide with the body content (#9446).

    Rather, the hierarchy is more like

    Root > CupertinoTabBar > PageView > (CupertinoScaffold: CupertinoNavigationBar + Navigator) > pages

    vs Material's

    Root > Navigator > page > Scaffold > AppBar + BottomNavigationBar

    (not too sure how to deal with fullscreen things like dialog barriers etc yet, maybe add something like look for the eldest navigatorstate)

    For sharing/interchangeability, CupertinoTabBar is just going to be dumb UI (maybe we need something else to bundle CupertinoTabBar and PageView together for convenience) so that can just go into Scaffold.bottomNavigationBar.

    CupertinoNavigationBar will have a simple mode and an 'immersive' mode. The simple mode just mimics the AppBar with less dynamic stuff. One button left, one button right, one title/segmented control/wtv widget in the middle. Can be used for fullscreen dialogs or with material in Scaffold.appBar for just UI.

    In full iOS mode, extract a superclass out of MaterialPageRoute that's easy to share with CupertinoPageRoute. Let CupertinoPageRoute take both the normal body builder and an CupertinoNavigationBar builder. If there's CupertinoScaffold (which would hold an animated navigation bar), it would use the page transition animation controller to also coordinate the crossfade between the 2 CupertinoNavigationBars.

  10. Hixie commented on May 24, 2017

    @Hixie
    Contributor

    For full-page dialogs, you can have another Navigator on the outside.

  11. xster commented on Jun 2, 2017

    @xster
    Member

    Remaining task in this issue:

    • automatic addition of the leading button as a back or cancel/close button depending on the page type (which would require moving the fullscreen dialog concept from material page route to widget)
    • more testing for integration with material scaffolds

    Extracting support for double row nav bars to a different issue #10469.

  12. yathit commented on Oct 1, 2017

    @yathit

    Can CupertinoTabScaffold be used in MaterialApp ?

  13. Hixie commented on Oct 2, 2017

    @Hixie
    Contributor

    Yes, in theory at least. I don't know if we've tested it.

  14. xster commented on Oct 17, 2017

    @xster
    Member

    @yathit, yes, Cupertino scaffolds can be used in MaterialApps. Cupertino nav bars and tabs can be used in Material Scaffolds and Material app bars can be used in CupertinoPageScaffold too.

    I created an example mixing and matching everything here:
    https://github.com/xster/flutter-test/blob/master/t48_material_and_cupertino/lib/main.dart

  15. github-actions commented on Sep 4, 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.

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

Metadata

Metadata

Assignees

Labels

c: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagesplatform-iosiOS applications specifically

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions