Skip to content

Expose alwaysShowMiddle as part of public API in CupertinoSliverNavigationBar #113542

@campovski

Description

@campovski

Use case

Currently, providing largeTitle and omitting middle to CupertinoSliverNavigationBar results in the same widget being used for
large title in expanded state and "middle title" in collapsed state, thus preventing a use of a different widget for collapsed state title (or just changing text style of the title for example). If we provide middle property as well (to be used as a title in collapsed state), both largeTitle and middle are visible when the nav bar is expanded (which is according to docs an expected behaviour). But, if we do not want such behaviour, it would be nice to have alwaysShowMiddle exposed with default value being widget.middle != null.

Proposal

Add alwaysShowMiddle as a field to CupertinoSliverNavigationBar and pass it to _LargeTitleNavigationBarSliverDelegate with default value of widget.middle != null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions