title: Customize flutter Tab bar
body: <p>I am using a TabBar widget and I'd like to customize the TabBar view like this image. I tried lot of times bus there are some spaces between two tabs.</p>
  
  <p><a href="https://i.stack.imgur.com/rWUlQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rWUlQ.png" alt="enter image description here"></a></p>
  
  <p>this is the code I used to customize the tab view.</p>
  
  <pre><code>TabBar(
              controller: _tabController,
              labelColor: Colors.black12,
              unselectedLabelColor: Colors.black12,
              indicatorSize: TabBarIndicatorSize.label,
              tabs: [
                Tab(
                  child: Container(
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.horizontal(
                          left: Radius.circular(50), right: Radius.zero),
                      border: _tabController.index == 1
                          ? Border.all(color: Colors.black12, width: 2)
                          : Border.all(color: Colors.transparent, width: 2),
  
                      color: _tabController.index == 0
                          ? Colors.indigo
                          : Colors.white,
                    ),
                    child: Align(
                      alignment: Alignment.center,
                      child: Text("Income"),
                    ),
                  ),
                ),
                Tab(
                  child: Container(
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.horizontal(
                          left: Radius.zero, right: Radius.circular(50)),
                      border: _tabController.index == 1
                          ? Border.all(color: Colors.transparent, width: 2)
                          : Border.all(color: Colors.black12, width: 2),
                      color: _tabController.index == 1
                          ? Colors.indigo
                          : Colors.white,
                    ),
                    child: Align(
                      alignment: Alignment.center,
                      child: Text("Expense"),
                    ),
                  ),
                ),
              ],
            ),
  </code></pre>
  
  <p><strong>output</strong></p>
  
  <p><a href="https://i.stack.imgur.com/iaR16.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iaR16.jpg" alt="enter image description here"></a></p>