title: How Use SliverPersistentHeader and TabBarView Together in Flutter?
body: <p>I have Main Page With <code>SliverPersistentHeader</code> and <code>TabBarView</code> Like Below code :</p>
  
  <pre><code> @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: Theme.of(context).backgroundColor,
        body: DefaultTabController(
          length: 3,
          child: NestedScrollView(
            headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
              return &lt;Widget&gt;[
                SliverAppBar(
                  expandedHeight: 250.0,
                  floating: false,
                  pinned: true,
                ),
                SliverPersistentHeader(
                  delegate: _SliverAppBarDelegate(
                    TabBar(
                      labelStyle: TextStyle(
                          fontFamily: 'Raleway',
                          fontSize: 17,
                          fontWeight: FontWeight.w400,
                          color: Theme.of(context).backgroundColor),
                      indicatorColor: Theme.of(context).hintColor,
                      labelColor: Theme.of(context).buttonColor,
                      unselectedLabelColor: Theme.of(context).dividerColor,
                      tabs: [
                        Tab(text: "Menu"),
                        Tab(text: "About"),
                        Tab(text: "Contact"),
                      ],
                    ),
                  ),
                  pinned: true,
                ),
              ];
            },
            body: TabBarView(
              children: &lt;Widget&gt;[MenuTab(), AboutTab(), ContactTab()],
            ),
          ),
        ),
      );
    }
  }
  
  class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
    _SliverAppBarDelegate(this._tabBar);
  
    final TabBar _tabBar;
  
    @override
    double get minExtent =&gt; _tabBar.preferredSize.height;
  
    @override
    double get maxExtent =&gt; _tabBar.preferredSize.height;
  
    @override
    Widget build(
        BuildContext context, double shrinkOffset, bool overlapsContent) {
      return new Container(
        child: _tabBar,
      );
    }
  
    @override
    bool shouldRebuild(_SliverAppBarDelegate oldDelegate) {
      return false;
    }
  }
  </code></pre>
  
  <hr>
  
  <p>after that I have Single Classes Foe Each tab, For Example Like Below code :</p>
  
  <pre><code>class _AboutTabState extends State&lt;AboutTab&gt; {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          backgroundColor: Theme.of(context).backgroundColor,
          body: ListView(
        children: &lt;Widget&gt;[
          ListView.builder(
            shrinkWrap: true,
            itemCount: _list.length,
            itemBuilder: (BuildContext context, int index) {
              final _aboutList = _list[index];
              return ExpansionTile(
                title: ListTile(
                  title: Padding(
                    padding: const EdgeInsets.fromLTRB(5, 0, 0, 0),
                    child: Text(_aboutList.aboutTitle,
                        style: TextStyle(
                            fontFamily: 'Raleway',
                            fontSize: 16,
                            fontWeight: FontWeight.w500,
                            color: Theme.of(context).buttonColor)),
                  ),
                ),
                children: &lt;Widget&gt;[
                  ListTile(
                    title: Padding(
                      padding: const EdgeInsets.fromLTRB(10, 0, 0, 0),
                      child: Text(_aboutList.content,
                          style: TextStyle(
                              fontFamily: 'Raleway',
                              fontSize: 16,
                              fontWeight: FontWeight.w400,
                              color: Theme.of(context).toggleableActiveColor)),
                    ),
                  )
                ],
              );
            },
          ),
        ],
      ));
  </code></pre>
  
  <hr>
  
  <p><strong>THE PROBLEM:</strong></p>
  
  <p>I get Bad Result When I Collapse the SliverPersistentHeader, Following The Screenshots. 
  tnx</p>
  
  <p><a href="https://i.stack.imgur.com/JlWn1.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/JlWn1.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/mAyal.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/mAyal.jpg" alt="enter image description here"></a></p>