title: Flutter : Can anybody help making custom TabController in flutter?
body: <p>I am making an app using flutter(dart). I need to make a tab controller with gradient background colour. I have used the DefaultTabController but couldn't get the way to add decoration or any gradient for App bar.Please find my code below:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:vtech/CustomAppBar.dart';
  
  class Policy extends StatefulWidget {
    @override
    _PolicyState createState() =&gt; _PolicyState();
  }
  
  class _PolicyState extends State&lt;Policy&gt; {
    @override
    Widget build(BuildContext context) {
  
  
  
  
      return MaterialApp(
        home: DefaultTabController(
          length: 3,
          child: Scaffold(
  
            appBar: AppBar(
              backgroundColor: Colors.pink,
              bottom: TabBar(
                tabs: [
                  Tab(icon: Icon(Icons.directions_car)),
                  Tab(icon: Icon(Icons.directions_transit)),
                  Tab(icon: Icon(Icons.directions_bike)),
                ],
              ),
              title: Center(child:Text('POLICY')),
            ),
            body: TabBarView(
              children: [
                Icon(Icons.directions_car),
                Icon(Icons.directions_transit),
                Icon(Icons.directions_bike),
              ],
            ),
          ),
        ),
      );
  
    }
  }
  </code></pre>