8000 `SliverAppBar` needs a custom widget area at the bottom of the layout · Issue #129868 · flutter/flutter · GitHub
[go: up one dir, main page]

Skip to content

SliverAppBar needs a custom widget area at the bottom of the layout #129868

@lukehutch

Description

@lukehutch

Is there an existing issue for this?

Use case

I want to add some custom dropdown controls below the title text in the SliverAppBar. There is no clean way to do this currently.

I have a SliverAppBar that contains a FlexibleSpaceBar with a cover image, a drawer, and some title text.

I tried adding these controls to the FlexibleSpaceBar, by hijacking background with a Column widget, but clearly the layout was not designed for this, and it's pretty much impossible to get the layout and animation right.

I added a SliverPersistentHeader, which does place the controls below the SliverAppBar, but there are several issues:

  • Really I just want the extra controls in the SliverPersistentHeader to appear as part of the SliverAppBar, not have their own hide/show semantics that are different from those of the SliverAppBar.
  • The pinning/floating behavior of SliverPersistentHeader is bizarre at best -- I want this header to appear whenever the SliverAppBar is maximized and I drag down, at any position in the wrapping CustomScrollView. However, SliverPersistentHeader seems to pin at an absolute position near the top of the CustomScrollView, so it only appears if I scroll the CustomScrollView nearly to the top. See floating behavior of SliverPersistentHeader does not match that of SliverAppBar #129869.
  • There is a tiny half-pixel gap between the SliverAppBar and the SliverPersistentHeader. This shows up as a faint white line occasionally, since both the app bar and the header have non-white backgrounds. See There is a half-pixel gap between SliverAppBar and SliverPersistentHeader #129870.

Proposal

Please add a SliverAppBar.footer field that allows the user to add a Widget to the bottom of the SliverAppBar.

It would also be great if this footer were dyamically-sizeable, so that content could be added to or removed from it, and it would take only as much vertical space as necessary to wrap the content.

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: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.team-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

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0