<p dir="auto">I have 2 tabs and I want to hide the AppBar when I scroll on either of them. The idea is to achieve the behavior with the floating option on SliverAppBar, but it doesn't work with the TabBarView. Instead of appearing again as soon as you start scrolling up, it only appears when you get to the top.</p>
<p dir="auto">Here's the snippet.</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Map&lt;String, MaterialColor&gt; pages = {
    'blue': Colors.lightBlue,
    'green': Colors.lightGreen
  };

  Widget build(BuildContext context) {
    return new DefaultTabController(
      length: pages.length,
      child: new Scaffold(
        body: new NestedScrollView(
          headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
            return &lt;Widget&gt;[
              SliverAppBar(
                title: const Text('Tabs and scrolling'),
                floating: true,
                expandedHeight: 150.0,
                forceElevated: innerBoxIsScrolled,
                bottom: new TabBar(
                  tabs: pages.keys.map(
                        (String label) =&gt; new Tab(text: label),
                  ).toList(),
                ),
              ),
            ];
          },

          body: new TabBarView(
            children: pages.keys.map((String label) {
              return new SafeArea(
                top: false,
                bottom: false,
                child: new Builder(
                  builder: (BuildContext context) {
                    return new CustomScrollView(
                      key: new PageStorageKey&lt;String&gt;(label),
                      slivers: &lt;Widget&gt;[
                        new SliverPadding(
                          padding: const EdgeInsets.symmetric(
                            vertical: 8.0,
                            horizontal: 16.0,
                          ),
                          sliver: new SliverFixedExtentList(
                            itemExtent: 100.0,
                            delegate: new SliverChildBuilderDelegate(
                                  (BuildContext context, int index) {
                                return new Padding(
                                  padding: const EdgeInsets.symmetric(
                                    vertical: 8.0,
                                  ),
                                  child: Container(
                                    alignment: Alignment.center,
                                    color: pages[label][100 * (index % 9)],
                                    child: new Text('list item $index'),
                                  )
                                );
                              },
                              childCount: 100,
                            ),
                          ),
                        ),
                      ],
                    );
                  },
                ),
              );
            }).toList(),
          ),
        ),
      ),
    );
  }
"><pre class="notranslate"><span class="pl-c1">Map</span>&lt;<span class="pl-c1">String</span>, <span class="pl-c1">MaterialColor</span>&gt; pages <span class="pl-k">=</span> {
    <span class="pl-s">'blue'</span><span class="pl-k">:</span> <span class="pl-c1">Colors</span>.lightBlue,
    <span class="pl-s">'green'</span><span class="pl-k">:</span> <span class="pl-c1">Colors</span>.lightGreen
  };

  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">DefaultTabController</span>(
      length<span class="pl-k">:</span> pages.length,
      child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
        body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">NestedScrollView</span>(
          headerSliverBuilder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">bool</span> innerBoxIsScrolled) {
            <span class="pl-k">return</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
              <span class="pl-c1">SliverAppBar</span>(
                title<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Tabs and scrolling'</span>),
                floating<span class="pl-k">:</span> <span class="pl-c1">true</span>,
                expandedHeight<span class="pl-k">:</span> <span class="pl-c1">150.0</span>,
                forceElevated<span class="pl-k">:</span> innerBoxIsScrolled,
                bottom<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBar</span>(
                  tabs<span class="pl-k">:</span> pages.keys.<span class="pl-en">map</span>(
                        (<span class="pl-c1">String</span> label) <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">Tab</span>(text<span class="pl-k">:</span> label),
                  ).<span class="pl-en">toList</span>(),
                ),
              ),
            ];
          },

          body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBarView</span>(
            children<span class="pl-k">:</span> pages.keys.<span class="pl-en">map</span>((<span class="pl-c1">String</span> label) {
              <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">SafeArea</span>(
                top<span class="pl-k">:</span> <span class="pl-c1">false</span>,
                bottom<span class="pl-k">:</span> <span class="pl-c1">false</span>,
                child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Builder</span>(
                  builder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context) {
                    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">CustomScrollView</span>(
                      key<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">PageStorageKey</span>&lt;<span class="pl-c1">String</span>&gt;(label),
                      slivers<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
                        <span class="pl-k">new</span> <span class="pl-c1">SliverPadding</span>(
                          padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">symmetric</span>(
                            vertical<span class="pl-k">:</span> <span class="pl-c1">8.0</span>,
                            horizontal<span class="pl-k">:</span> <span class="pl-c1">16.0</span>,
                          ),
                          sliver<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">SliverFixedExtentList</span>(
                            itemExtent<span class="pl-k">:</span> <span class="pl-c1">100.0</span>,
                            delegate<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">SliverChildBuilderDelegate</span>(
                                  (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">int</span> index) {
                                <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Padding</span>(
                                  padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">symmetric</span>(
                                    vertical<span class="pl-k">:</span> <span class="pl-c1">8.0</span>,
                                  ),
                                  child<span class="pl-k">:</span> <span class="pl-c1">Container</span>(
                                    alignment<span class="pl-k">:</span> <span class="pl-c1">Alignment</span>.center,
                                    color<span class="pl-k">:</span> pages[label][<span class="pl-c1">100</span> <span class="pl-k">*</span> (index <span class="pl-k">%</span> <span class="pl-c1">9</span>)],
                                    child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'list item $<span class="pl-v">index</span>'</span>),
                                  )
                                );
                              },
                              childCount<span class="pl-k">:</span> <span class="pl-c1">100</span>,
                            ),
                          ),
                        ),
                      ],
                    );
                  },
                ),
              );
            }).<span class="pl-en">toList</span>(),
          ),
        ),
      ),
    );
  }
</pre></div>
<p dir="auto">Here is the output of flutter doctor:</p>
<blockquote>
<p dir="auto">Doctor summary (to see all details, run flutter doctor -v):<br>
[✓] Flutter (Channel master, v0.9.6-pre.35, on Linux, locale en_US.UTF-8)<br>
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)<br>
[✓] Android Studio (version 3.2)<br>
[✓] Connected device (1 available)</p>
</blockquote>
<p dir="auto">b/136489010</p>
<p dir="auto">I want to make a floating app bar that's shared across multiple TabBarViews, so I used a NestedScrollView. I would expect the app bar to appear whenever I scroll up at any point of the page but it does not seem to do so?</p>
<p dir="auto"><strong>main.dart</strong></p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    import 'package:flutter/material.dart';

    void main() {

        Widget getPage(){
            return new ListView.builder(
                itemBuilder: ((context, index){
                    return new ListTile(
                        title: new Text('Item $index')
                    );
                }),
            );
        }

        runApp(
            new MaterialApp(
                home: new DefaultTabController(
                    length: 2,
                    child: new Scaffold(
                        body: new NestedScrollView(
                            headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
                                return &lt;Widget&gt;[
                                    new SliverAppBar(
                                        floating: true,
                                        bottom: new TabBar(
                                            tabs: [
                                                new Tab(text: 'tab1'),
                                                new Tab(text: 'tab2'),
                                            ],
                                        ),
                                    ),
                                ];
                            },
                            body: new TabBarView(
                                children: [
                                    getPage(),
                                    getPage(),
                                ],
                            ),
                        ),
                    ),
                ),
            ),
        );
    }"><pre class="notranslate">    import <span class="pl-s">'package:flutter/material.dart'</span>;

    <span class="pl-k">void</span> <span class="pl-en">main</span>() {

        <span class="pl-c1">Widget</span> <span class="pl-en">getPage</span>(){
            <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">ListView</span>.<span class="pl-en">builder</span>(
                itemBuilder<span class="pl-k">:</span> ((context, index){
                    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">ListTile</span>(
                        title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Item $<span class="pl-v">index</span>'</span>)
                    );
                }),
            );
        }

        <span class="pl-en">runApp</span>(
            <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>(
                home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">DefaultTabController</span>(
                    length<span class="pl-k">:</span> <span class="pl-c1">2</span>,
                    child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
                        body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">NestedScrollView</span>(
                            headerSliverBuilder<span class="pl-k">:</span> (<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">bool</span> innerBoxIsScrolled) {
                                <span class="pl-k">return</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
                                    <span class="pl-k">new</span> <span class="pl-c1">SliverAppBar</span>(
                                        floating<span class="pl-k">:</span> <span class="pl-c1">true</span>,
                                        bottom<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBar</span>(
                                            tabs<span class="pl-k">:</span> [
                                                <span class="pl-k">new</span> <span class="pl-c1">Tab</span>(text<span class="pl-k">:</span> <span class="pl-s">'tab1'</span>),
                                                <span class="pl-k">new</span> <span class="pl-c1">Tab</span>(text<span class="pl-k">:</span> <span class="pl-s">'tab2'</span>),
                                            ],
                                        ),
                                    ),
                                ];
                            },
                            body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TabBarView</span>(
                                children<span class="pl-k">:</span> [
                                    <span class="pl-en">getPage</span>(),
                                    <span class="pl-en">getPage</span>(),
                                ],
                            ),
                        ),
                    ),
                ),
            ),
        );
    }</pre></div>
<p dir="auto">Strangely enough if "snap: true" is set for the SliverAppBar the desired effect is achieved. But I don't want it to snap.</p>
<p dir="auto">Similar issue here: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="242876778" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/11222" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/11222/hovercard" href="https://github.com/flutter/flutter/issues/11222">#11222</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.3.2, on Microsoft Windows [Version 10.0.16299.431], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK 26.0.3)
[X] Android Studio (not installed)
[√] VS Code, 64-bit edition (version 1.23.0)
[!] Connected devices
    ! No devices available
! Doctor found issues in 2 categories."><pre class="notranslate"><code class="notranslate">Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.3.2, on Microsoft Windows [Version 10.0.16299.431], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK 26.0.3)
[X] Android Studio (not installed)
[√] VS Code, 64-bit edition (version 1.23.0)
[!] Connected devices
    ! No devices available
! Doctor found issues in 2 categories.
</code></pre></div>