Reputation: 1909
The example code in https://api.flutter.dev/flutter/widgets/NestedScrollView-class.html shows how to display a collapsible SliverAppBar
with a bottom:TabBar
.
The problem is, the moment I add flexibleSpace: FlexibleSpaceBar
to set the background picture for the appbar, the picture bleeds to the tabbar. I don't want the tabbar to have any background picture.
I could wrap the tabbar in a container and give it a background color, but then the picture will look cropped at the bottom.
Alternatively, https://medium.com/@diegoveloper/flutter-collapsing-toolbar-sliver-app-bar-14b858e87abe suggests that I use SliverPersistentHeader
for the tabbar.
The problem is, since there are 2 pinned slivers on top, I can't use SliverOverlapAbsorber
. I need to show different states based on whether the top slivers are expanded/collapsed.
Suggestions?
Upvotes: 0
Views: 626
Reputation: 1909
There's an open issue exactly for this problem: https://github.com/flutter/flutter/issues/25723
Upvotes: 1