title: Precache Method image does not cache
body: <p>Sorry for my poor English. I implemented the prechace of the assets but he does not hear any changes, always the first time that I select an icon of the guide he has a small delay of change of state, after the navigation is smooth with quick change of state of the icons, I am beginner in flutter, perhaps Do something wrong with my logic. Could someone with a little more experience see where I am wrong? I'm using a physical device for testing, android.</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:gestorgendo/pages/Dash/ScheduleScreen.dart';
  
  class DashScreen extends StatefulWidget {
    @override
    _DashScreenState createState() =&gt; _DashScreenState();
  }
  
  class _DashScreenState extends State&lt;DashScreen&gt; with SingleTickerProviderStateMixin {
    TabController _tabcontroller;
    int _tabIndex = 0;
    Image calendarSelect;
    Image calendarUnselect;
    Image invoiceSelect;
    Image invoiceUnselect;
    Image addSelect;
    Image addUnselect;
    Image chatSelect;
    Image chatUnselect;
    Image settingsSelect;
    Image settingsUnselect;
  
    List&lt;Widget&gt; _tabListBody = [ new ScheduleScreen(), new ScheduleScreen(), new ScheduleScreen(), new ScheduleScreen(), new ScheduleScreen()];
    @override
    void initState(){
      super.initState();
        calendarSelect = new Image.asset("assets/icons/calendar_2.png",width: 26.0, height: 26.0);
        calendarUnselect = new Image.asset("assets/icons/calendar_grey_2.png",width: 26.0, height: 26.0);
  
        invoiceSelect = new Image.asset("assets/icons/invoice.png",width: 30.0, height: 30.0);
        invoiceUnselect = new Image.asset("assets/icons/invoice_grey.png",width: 30.0, height: 30.0);
  
        addSelect = new Image.asset("assets/icons/add.png",width: 26.0, height: 26.0);
        addUnselect = new Image.asset("assets/icons/add_grey.png",width: 26.0, height: 26.0);
  
        chatSelect = new Image.asset("assets/icons/chat.png",width: 26.0, height: 26.0);
        chatUnselect = new Image.asset("assets/icons/chat_grey.png",width: 26.0, height: 26.0);
  
        settingsSelect = new Image.asset("assets/icons/settings.png",width: 26.0, height: 26.0);
        settingsUnselect = new Image.asset("assets/icons/settings_grey.png",width: 26.0, height: 26.0);
  
      _tabcontroller = new TabController(length: 5, vsync: this);
      _tabcontroller.addListener((){
        setState(() {
          _tabIndex = _tabcontroller.index;
        });
      });
    }
      @override
      void didChangeDependencies() async {
        super.didChangeDependencies();
        await precacheImage(calendarSelect.image,context);
        await precacheImage(calendarUnselect.image,context);
  
        await precacheImage(invoiceSelect.image,context);
        await precacheImage(invoiceUnselect.image,context);
  
        await precacheImage(addSelect.image,context);
        await precacheImage(addUnselect.image,context);
  
        await precacheImage(chatSelect.image,context);
        await precacheImage(chatUnselect.image,context);
  
        await precacheImage(settingsSelect.image,context);
        await precacheImage(settingsUnselect.image,context);
  
      }
    @override
    void dispose() {
      // Dispose of the Tab Controller
      _tabcontroller.dispose();
      super.dispose();
    }
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        body: new TabBarView(
          controller: _tabcontroller,
          children: _tabListBody,
        ),
        bottomNavigationBar: new TabBar(
          controller: _tabcontroller,
          tabs: &lt;Widget&gt;[
            Tab(
              //icon: new Icon(Icons.calendar_today, color: _tabIndex == 0 ? Colors.green : Colors.grey),
              icon: _tabIndex == 0 
                    ? calendarSelect
                    : calendarUnselect
              //text:"Home",      
            ),
            Tab(
              //icon: new Icon(Icons.search, color: _tabIndex == 1 ? Colors.green : Colors.grey),
              icon: _tabIndex == 1 
                    ? invoiceSelect
                    : invoiceUnselect
              //text: "Busca"
            ),
            Tab(
              //icon: new Icon(Icons.add_box, color: _tabIndex == 2 ? Colors.green : Colors.grey),
              icon: _tabIndex == 2 
                    ? addSelect
                    : addUnselect
              //text: "Add"
            ),
            Tab(
              //icon: new Icon(Icons.message, color: _tabIndex == 3 ? Colors.green : Colors.grey),
              icon: _tabIndex == 3 
                    ? chatSelect
                    : chatUnselect
              //text: "Favotiros"
            ),
            Tab(
              //icon: new Icon(Icons.more_vert, color: _tabIndex == 4 ? Colors.green : Colors.grey),
              icon: _tabIndex == 4 
                    ? settingsSelect
                    : settingsUnselect
              //text: "More"
            ),
          ],
        ),
      );
    }
  }
  </code></pre>