title: TabBarView throwing hasSize error because of height?
body: <p>So basically I'm trying to implement a <code>TabBar and TabBarView</code> into a CustomScrollView widget and its throwing this error:</p>
  <blockquote>
  <p>RenderBox was not laid out: _RenderScrollSemantics#ab91d relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  'package:flutter/src/rendering/box.dart':
  Failed assertion: line 1930 pos 12: 'hasSize'</p>
  </blockquote>
  <p><strong>The issue is definitely the TabBarView and its height.</strong></p>
  <p><strong>Widget that works:</strong></p>
  <pre><code>SliverToBoxAdapter(
              child: Container(
                height: size.height,
                child: TabBarView(
                  controller: this._controller,
                  children: [
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                  ],
                ),
              ),
            )
  </code></pre>
  <p><strong>Widget that doesn't work</strong></p>
  <pre><code>SliverToBoxAdapter(
              child: Container(
                child: TabBarView(
                  controller: this._controller,
                  children: [
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                  ],
                ),
              ),
            )
  </code></pre>
  <p>The reason why I don't just use the working widget is because I don't want the height to be fixed. I want it to be as much as the its children need. Thats why I tried to use Expanded but it throws the same error.</p>
  <p>What am I doing wrong here?</p>
  <p>Here is the entire widget tree if its helps:</p>
  <pre><code>Scaffold(
        body: CustomScrollView(
          slivers: [
            SliverAppBar(
              expandedHeight: size.height * 0.45,
              pinned: true,
              flexibleSpace: FlexibleSpaceBar(
                background: MyImage(),
                centerTitle: true,
                title: Text(&quot;-_-&quot;);,
              ),
            ),
            SliverToBoxAdapter(
              child: Column(
                children: [
                  SizedBox(height: 20),
                  MyInfo(),
                  SizedBox(height: 10),
                ],
              ),
            ),
            SliverToBoxAdapter(
              child: Container(
                child: TabBar(
                  controller: this._controller,
                  indicatorColor: primaryCScheme,
                  tabs: [
                    Tab(
                      icon: Icon(CupertinoIcons.add),
                    ),
                    Tab(
                      icon: Icon(CupertinoIcons.scissors),
                    ),
                    Tab(
                      icon: Icon(CupertinoIcons.film),
                    ),
                  ],
                ),
              ),
            ),
            SliverToBoxAdapter(
              child: Container(
                height: size.height,            // here is the issue
                color: Colors.red,
                child: TabBarView(
                  controller: this._controller,
                  children: [
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                    Center(
                      child: Text(&quot;Hello&quot;),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      )
  </code></pre>