title: Flutter animation on grid expand
body: <p>I want animation on grid expand. At first gird shows 4 items only and later on click button grid shows all item i.e more than 4 (with an animation). In a row there are 4 items.</p>
  
  <pre><code>bool click = false;
   return Container(
        width: double.infinity,
        child: GridView.builder(
      physics: NeverScrollableScrollPhysics(),
      shrinkWrap: true,
      gridDelegate:
          new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
      itemBuilder: (BuildContext context, int index) {
        return GestureDetector(
          onTap: () {
            if (index % 3 == 0) {
              Navigator.of(context).push(SlideLeftRoute(
                  widget: Search(
                "Restaurant",
                isSearchFromTextField: false,
                list: list,
              )));
            } else {
              Navigator.of(context)
                  .push(SlideLeftRoute(widget: RestaurantDetail()));
            }
          },
          child: Container(
            child: Column(
              children: &lt;Widget&gt;[
                Container(
                  padding: EdgeInsets.all(10),
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(4),
                    color: HexColor(widget._homeScopedModel.homePageModel
                        .category[index].color),
                  ),
                  child: SvgPicture.asset(
                    'assets/images/restaurant.svg',
                    width: 30,
                    height: 30,
                    color: CustomColor.white,
                  ),
                ),
                SizedBox(
                  height: 10,
                ),
                Text(
                  widget._homeScopedModel.homePageModel.category[index].name,
                  style: TextStyle(
                    color: CustomColor.black,
                    fontSize: 12.0,
                    fontFamily: 'SFProDisplay',
                    fontWeight: FontWeight.w400,
                  ),
                  textAlign: TextAlign.center,
                ),
              ],
            ),
          ),
        );
      },
      itemCount:
          click ? widget._homeScopedModel.homePageModel.category.length : 4,
        ),
      );
  
  
  //on click image
  new GestureDetector(
                            child: RotatedBox(
                              quarterTurns: click ? 2 : 0,
                              child: SvgPicture.asset(
                                'assets/images/icon_down.svg',
                                width: 15,
                                height: 15,
                                color: CustomColor.grey,
                              ),
                            ),
                            onTap: () {
                              click = !click;
                              setState(() {});
                            },
                          ),
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9vkte.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9vkte.jpg" alt="Before grid expand"></a></p>
  
  <p><a href="https://i.stack.imgur.com/tSSfo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tSSfo.jpg" alt="After grid Expand"></a></p>
  
  <p>On Click image the grid view will expand. I want slide down and slide up animation on click image. I tried Animated Container but it doesn't work for me. I found animation only on expanding other view like below. <a href="https://stackoverflow.com/questions/49029841/how-to-animate-collapse-elements-in-flutter">how to animate collapse elements in flutter</a></p>