Skip to content

CupertinoSliverNavigationBar and CupertinoNavigationBar should support background colors #78607

@campovski

Description

@campovski

Both CupertinoSliverNavigationBar and CupertinoNavigationBar should support background colors for the expanded and collapsed states. These colors could also be lerped when those states are in transition.

The second part of the original issue should be followed up on in #53788


OP:

Use case

Currently, CupertinoSliverNavigationBar does not support the following two things.

  1. Different background colors for expanded and collapsed state.
  2. Different titles for expanded and collapsed state. The use case could be using largeTitle: 'Profile' and middle: username for example. Currently, in expanded state both largeTitle and middle are shown, which I think is incorrect.

Proposal

I propose that CupertinoSliverNavigationBar supports the following two things:

  1. different background colors for expanded and collapsed state with possibility to animate the color change on scroll, and
  2. different titles for expanded and collapsed state by either:

The following video shows an example of animated color transition I would like to achieve.

example.MP4

Note

I am willing to implement this if it receives a green light, however details whether color change should be animated or not and which of the three options for point 2. is the best have to be discussed first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: 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.r: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions