fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
592 stars 119 forks source link

How to make TabBar pin at the top? #7

Closed KingWu closed 4 years ago

KingWu commented 5 years ago

Previously, i use SliverPersistentHeader for Pinned header.

But, for your example, you don't use SliverPersistentHeader. So, how do you do that?

zmtzawqlp commented 5 years ago

SliverPersistentHeader is the same , and it's include in pinned header height

KingWu commented 5 years ago
//  widgets.add(SliverPersistentHeader(
//      pinned: true,
//      floating: false,
//      delegate: CommonSliverPersistentHeaderDelegate(
//          Container(
//            child: primaryTabBar,
//            //color: Colors.white,
//          ),
//          primaryTabBar.preferredSize.height)));

But, i found these codes are commented. You mean extended.NestScrollView is handled the pinned header internally?

zmtzawqlp commented 5 years ago

right.you can use SliverPersistentHeader , and remember set pinnedHeaderHeight.

KingWu commented 5 years ago

@zmtzawqlp I am facing the rollback issue. https://vimeo.com/345854436

Widget Tree for Demo page

NestedScrollView
  SilverAppBar
    Column
       TabBar
       TabView

Widget Tree for each TabView

ListView
      HeaderContent
      Card
      Card
      Card

Does i implement in a wrong way?

zmtzawqlp commented 5 years ago

put this image in nestedscrollview body.

please tell the problem, and provide demo