-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
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.
- Different background colors for expanded and collapsed state.
- Different titles for expanded and collapsed state. The use case could be using
largeTitle: 'Profile'andmiddle: usernamefor example. Currently, in expanded state bothlargeTitleandmiddleare shown, which I think is incorrect.- this second request is reflected in CupertinoSliverNavigationBar & CupertinoNavigationBar should support differing style||widget for
largeTitleandmiddle#53788
- this second request is reflected in CupertinoSliverNavigationBar & CupertinoNavigationBar should support differing style||widget for
Proposal
I propose that CupertinoSliverNavigationBar supports the following two things:
- different background colors for expanded and collapsed state with possibility to animate the color change on scroll, and
- different titles for expanded and collapsed state by either:
- not showing
middleproperty on expanded state (which I think should be the way to go), or - adding a
bool showMiddleWhenExpandedproperty denoting whethermiddleshould be present in expanded state as well (probably even better than the first option), or - adding another property
titlethat is showed instead oflargeTitlein collapsed state. This would mean thatmiddleis only showed in expanded state which I think is not OK. - this second request is reflected in CupertinoSliverNavigationBar & CupertinoNavigationBar should support differing style||widget for
largeTitleandmiddle#53788
- not showing
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.
martelman, henry2man, radomir9720, dennismuench and hectorAguero
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Type
Projects
Status
Done