title: Flutter SliverAppbar in NestedScrollView header does not stretch and zoom like it would stretch in CustomScrollView
body: <p>The SliverAppbar will stretch and zoom if it is in a customScrollView but it does not when it is in NestedScrollView. Only the body of NestedScrollView has a BouncingScrollPhysics, how can the header of NestedScrollView also have the BouncingScrollPhysics so it can stretch and zoom the SliverAppBar.</p>
  
  <p>However, if i add scrollController in the body/inner scrollView then the header SliverAppBar stretches, but then they become two separate scroll views and the header does not scroll up when the body is scrolled. Check the 
  <a href="https://www.dropbox.com/s/ez0uw0a0cda09cq/iphone.mov?dl=0" rel="nofollow noreferrer">Screen recording</a></p>
  
  <pre><code>      @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: DefaultTabController(
          length: 3,
          child: NestedScrollView(
            physics: BouncingScrollPhysics(),
            controller: mainScroller,
            headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
              return &lt;Widget&gt;[
                SliverAppBar(
                  stretch: true,
                  pinned: true,
                  floating: false,
                  elevation: 0,
                  onStretchTrigger: () {
                    print('stretch');
                    return;
                  },
                  title: isFlexibleSpaceVisible ? null : Text(widget.name),
                  expandedHeight: containerHeight - kToolbarHeight,
                  flexibleSpace: FlexibleSpaceBar(
                    stretchModes: &lt;StretchMode&gt;[
                      StretchMode.zoomBackground,
                      StretchMode.blurBackground,
                    ],
                    collapseMode: CollapseMode.pin,
                    background: Container(
                      color: Theme.of(context).canvasColor,
                      child: Stack(
                        children: &lt;Widget&gt;[
                          Container(
                            height: headerImageHeight,
                            width: double.infinity,
                            decoration: BoxDecoration(
                              color: kBackgroundColor,
                              image: DecorationImage(
                                fit: BoxFit.cover,
                                colorFilter: ColorFilter.mode(
                                  Colors.black54,
                                  BlendMode.darken,
                                ),
                                image: NetworkImage(
                                    'https://picsum.photos/seed/${Random().nextInt(100)}/${MediaQuery.of(context).size.width.toInt()}'),
                              ),
                            ),
                          ),
                          Container(
                            height: headerSpace,
                            margin: EdgeInsets.only(
                                top: headerImageHeight - bringImageUpMargin),
                            padding: EdgeInsets.only(left: 8, right: 8),
                            child: Row(
                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: &lt;Widget&gt;[
                                Container(
                                  decoration: BoxDecoration(
                                      color: Theme.of(context).canvasColor,
                                      shape: BoxShape.circle),
                                  padding: EdgeInsets.all(6),
                                  child: CircleAvatar(
                                    backgroundColor: kCardColor,
                                    backgroundImage: NetworkImage(
                                        'https://picsum.photos/seed/${Random().nextInt(100)}/200'),
                                    radius: profileImageRadius,
                                  ),
                                ),
                                Expanded(
                                  child: Container(
                                    margin: EdgeInsets.symmetric(
                                        horizontal: 4, vertical: 12),
                                    child: Column(
                                      mainAxisAlignment: MainAxisAlignment.end,
                                      crossAxisAlignment:
                                          CrossAxisAlignment.stretch,
                                      children: &lt;Widget&gt;[
                                        Text(
                                          widget.name,
                                          style: TextStyle(
                                              fontSize: 16,
                                              fontWeight: FontWeight.w700),
                                        ),
                                        SizedBox(height: 2),
                                        Wrap(
                                          alignment: WrapAlignment.spaceBetween,
                                          children: &lt;Widget&gt;[
                                            Container(
                                              padding: EdgeInsets.symmetric(
                                                  horizontal: 6, vertical: 2),
                                              decoration: BoxDecoration(
                                                  color: kPrimaryColor,
                                                  borderRadius:
                                                      BorderRadius.circular(4)),
                                              child: Text(
                                                widget.skill,
                                                style: TextStyle(
                                                    fontSize: 12,
                                                    color: Colors.white),
                                              ),
                                            ),
                                            Container(
                                              padding: EdgeInsets.symmetric(
                                                  vertical: 2, horizontal: 6),
                                              decoration: BoxDecoration(
                                                  color: kCardColor,
                                                  borderRadius:
                                                      BorderRadius.circular(4)),
                                              child: Text(
                                                '\$${widget.rate} / ${widget.per}',
                                                style: TextStyle(
                                                    color: kPrimaryColor,
                                                    fontSize: 12),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ],
                                    ),
                                  ),
                                )
                              ],
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Container(
                    padding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
                    child: Column(
                      children: &lt;Widget&gt;[
                        Row(
                          children: &lt;Widget&gt;[
                            Container(
                                width: 22,
                                height: 18,
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(4),
                                  color: kSecondaryColor,
                                ),
                                child: Icon(
                                  Icons.star,
                                  color: Colors.white,
                                  size: 14,
                                )),
                            SizedBox(
                              width: 6,
                            ),
                            Text('Do you recommend ${widget.name} ?'),
                          ],
                        ),
                        Row(
                          children: &lt;Widget&gt;[
                            Expanded(
                              child: OutlineButton(
                                highlightedBorderColor: kSecondaryColor,
                                color: kSecondaryColor,
                                borderSide: BorderSide(color: kSecondaryColor),
                                textColor: kSecondaryColor,
                                onPressed: () =&gt; null,
                                child: Text('NO'),
                              ),
                            ),
                            SizedBox(
                              width: 8,
                            ),
                            Expanded(
                              child: RaisedButton(
                                onPressed: () =&gt; null,
                                child: Text('YES'),
                              ),
                            ),
                          ],
                        )
                      ],
                    ),
                  ),
                ),
                SliverPersistentHeader(
                  pinned: true,
                  delegate: SliverProfileTabs(),
                )
              ];
            },
            body: ProfileTabsView(data: widget),
          ),
        ),
      );
    }
  }
  </code></pre>